Skip to content

Commit db74690

Browse files
hidekazunak8s-ci-robot
authored andcommitted
Fix generate.sh (#464)
Generate.sh returns unbound variable error without augments. This PR fixes it.
1 parent e783aa8 commit db74690

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/generate.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ while test $# -gt 0; do
6464
done
6565

6666
# Check if clouds.yaml file provided
67-
if [[ -n "$1" ]] && [[ $1 != -* ]] && [[ $1 != --* ]];then
67+
if [[ -n "${1-}" ]] && [[ $1 != -* ]] && [[ $1 != --* ]];then
6868
CLOUDS_PATH="$1"
6969
else
7070
echo "Error: No clouds.yaml provided"
@@ -74,7 +74,7 @@ else
7474
fi
7575

7676
# Check if os cloud is provided
77-
if [[ -n "$2" ]] && [[ $2 != -* ]] && [[ $2 != --* ]]; then
77+
if [[ -n "${2-}" ]] && [[ $2 != -* ]] && [[ $2 != --* ]]; then
7878
export CLOUD=$2
7979
else
8080
echo "Error: No cloud specified"
@@ -83,7 +83,7 @@ else
8383
exit 1
8484
fi
8585

86-
if [[ -n "$3" ]] && [[ $3 != -* ]] && [[ $3 != --* ]]; then
86+
if [[ -n "${3-}" ]] && [[ $3 != -* ]] && [[ $3 != --* ]]; then
8787
OUTPUT_DIR=$(echo $3 | tr '[:upper:]' '[:lower:]')
8888
else
8989
echo "no output folder provided, use name '_out' by default"

0 commit comments

Comments
 (0)