Skip to content

Commit 211ecc5

Browse files
committed
Do sanity checking early
Fail before doing anything when passed parameters are invalid.
1 parent 61d0147 commit 211ecc5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/config_version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/sh
22

3+
if [ $# -ne 2 -o ! -d "$1" -o ! -d "$1/$2" ]; then
4+
echo "usage: $0 <environmentpath> <environment>" >&2
5+
exit 1
6+
fi
7+
38
ruby=ruby
49
script="$1/$2/scripts/config_version.rb"
510

0 commit comments

Comments
 (0)