diff --git a/script/yaml.sh b/script/yaml.sh index cda48d4..ec5ece5 100755 --- a/script/yaml.sh +++ b/script/yaml.sh @@ -5,7 +5,7 @@ parse_yaml() { local yaml_file=$1 - local prefix=$2 + local prefix=${2:-} local s local w local fs @@ -71,6 +71,6 @@ create_variables() { # Execute parse_yaml() direct from command line -if [ "x" != "x${1}" ] && [ "x--debug" != "x${1}" ]; then - parse_yaml "${1}" "${2}" +if [ "x" != "x${1:-}" ] && [ "x--debug" != "x${1:-}" ]; then + parse_yaml "${1}" "${2:-}" fi