File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ deploy() {
393393 if [ -n " $ENVIRONMENT_VARIABLES_FILE " ]; then
394394 local new_stack_envvars
395395 new_stack_envvars=$( env_file_to_json)
396- stack_envvars=" $( echo -n " ${new_stack_envvars}${stack_envvars} " | jq -sjc ' add | unique_by(.name)' ) "
396+ stack_envvars=" $( echo " ${new_stack_envvars}${stack_envvars} " | jq -sjc ' add | unique_by(.name)' ) "
397397 fi
398398 local data_prefix=" {\" Id\" :\" $stack_id \" ,\" StackFileContent\" :\" "
399399 local data_suffix=" \" ,\" Env\" :" $stack_envvars " ,\" Prune\" :$PORTAINER_PRUNE }"
@@ -470,7 +470,7 @@ undeploy() {
470470# JSON string #
471471# ##################################################
472472env_file_to_json () {
473- echo " $( env -i $( cat $ ENVIRONMENT_VARIABLES_FILE) jq -n ' env | to_entries | map({name: .key, value: .value})' ) "
473+ echo " $( env -i sh -c " (unset \$ (env | sed 's/=.*//'); set -a; . $( readlink -f $ ENVIRONMENT_VARIABLES_FILE) ; set +a; jq -njc 'env | to_entries | map({name: .key, value: .value})') " ) "
474474}
475475
476476main " $@ "
You can’t perform that action at this time.
0 commit comments