Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
caruccio committed Jun 18, 2024
1 parent 3d74670 commit 288c180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions root/etc/profile.d/getup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ function get_tf_config()
case "$(hcl2json "$TF_VARS_FILE" | jq -Mrc ".${tf_var_name}|type")" in
string|number|object)
hcl2json "$TF_VARS_FILE" | jq -Mrc ".${tf_var_name}"
return
;;
array)
hcl2json "$TF_VARS_FILE" | jq -Mrc ".${tf_var_name}|join(\"\n\")"
return
esac

echo $default
Expand Down
2 changes: 1 addition & 1 deletion root/usr/local/bin/kubespray-apply
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu

source /etc/profile.d/getup.sh

if [[ "$1" =~ (-h|--help) ]] ; then
if [ $# -gt 0 ] && [[ "$1" =~ (-h|--help) ]] ; then
echo "Usage: $0 [ansible-playbook parameters...]"
exit 1
fi
Expand Down

0 comments on commit 288c180

Please sign in to comment.