Skip to content

Commit

Permalink
template: Fix default value with spaces
Browse files Browse the repository at this point in the history
#692 
@michael-o 

This essentially just makes sure there are not multiple quotes following each other inside the ARG value.
  • Loading branch information
tschettervictor authored Feb 10, 2025
1 parent c6a62a9 commit 4dc2b3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr/local/share/bastille/template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ get_arg_name() {

parse_arg_value() {
# Parses the value after = and then escapes back/forward slashes and single quotes in it. -- cwells
echo "${1}" | sed -E 's/[^=]+=?//' | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/'\''/'\''\\'\'\''/g' -e 's/&/\\&/g'
echo "${1}" | sed -E 's/[^=]+=?//' | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/'\''/'\''\\'\'\''/g' -e 's/&/\\&/g' -e 's/""/"/g'
}

get_arg_value() {
Expand Down

0 comments on commit 4dc2b3b

Please sign in to comment.