Skip to content

Commit

Permalink
Only replace top-level tags entry in config (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkabrda committed Jun 7, 2023
1 parent 1c1ff38 commit 067845e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install_script.sh.template
Expand Up @@ -1036,7 +1036,7 @@ EOF
if [ "$host_tags" ]; then
printf "\033[34m\n* Adding your HOST TAGS to the $nice_flavor configuration: $config_file\n\033[0m\n"
formatted_host_tags="['""$( echo "$host_tags" | sed "s/,/','/g" )""']" # format `env:prod,foo:bar` to yaml-compliant `['env:prod','foo:bar']`
$sudo_cmd sh -c "sed -i \"s/# tags:.*/tags: ""$formatted_host_tags""/\" $config_file"
$sudo_cmd sh -c "sed -i \"s/^# tags:.*/tags: ""$formatted_host_tags""/\" $config_file"
fi
fi

Expand Down

0 comments on commit 067845e

Please sign in to comment.