Skip to content

Commit c7d942d

Browse files
refactor: enforce max number of parameters
1 parent 8a05998 commit c7d942d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/upload-to-s3.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ if [ $# -eq 2 ]; then
3535
DRY_RUN=--dryrun
3636
fi
3737

38+
if [ $# -gt 2 ]; then
39+
echo "Too many parameters\nUsage: upload-to-s3.sh <release-channel> <dryrun>" && exit 1
40+
fi
41+
3842
function uploadFile() {
3943
FILENAME_SRC=$1
4044
FILENAME_DST=$2

0 commit comments

Comments
 (0)