Skip to content

Commit 1044b7c

Browse files
fix command_file loading
1 parent 7359f31 commit 1044b7c

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

assets/out

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ fi
6767

6868
cd "$working_dir"
6969

70-
if [ -r "$command_file" ]; then
71-
printf '\e[92m[INFO]\e[0m Populating params from file (overwriting params in pipeline definition): %s\n' "$command_file"
72-
params=$(yq r --tojson "$command_file")
73-
else
74-
printf '\e[91m[ERROR]\e[0m invalid payload (can not find command_file: %s)\n' "$command_file"
75-
exit 1
70+
if [ -n "$command_file" ]; then
71+
if [ -r "$command_file" ]; then
72+
printf '\e[92m[INFO]\e[0m Populating params from file (overwriting params in pipeline definition): %s\n' "$command_file"
73+
params=$(yq r --tojson "$command_file")
74+
else
75+
printf '\e[91m[ERROR]\e[0m invalid payload (can not find command_file: %s)\n' "$command_file"
76+
exit 1
77+
fi
7678
fi
7779

7880
printf '\e[92m[INFO]\e[0m %s\n' "$(cf version)"

0 commit comments

Comments
 (0)