Skip to content

Commit 1d976b1

Browse files
authored
Fixed all option parsing issues in deploy.sh
1 parent 4c5643c commit 1d976b1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

deploy.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ while [ "${1#-}" != "$1" ]; do
3737
usage
3838
exit 0
3939
;;
40+
'-')
41+
error "Invalid options" 1 usage
42+
;;
43+
--*)
44+
error "Unknown option: $opt" 1 usage
45+
;;
4046
*)
41-
error "unknown option: -$opt" 1 usage
47+
error "Unknown option: -$opt" 1 usage
4248
;;
4349
esac
4450
done
@@ -95,7 +101,7 @@ if [ "$bootstrap_diff" -ne 0 ]; then
95101
read -r response
96102
case "$response" in
97103
[yY][eE][sS]|[yY]) ;;
98-
*) printf 'Cancelling deployment.'; exit 1 ;;
104+
*) printf "Cancelling deployment.\n"; exit 1 ;;
99105
esac
100106
fi
101107

0 commit comments

Comments
 (0)