From a976e3ac4cee0950c18726ab8ec86b036803823b Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Nov 2022 23:44:48 +0000 Subject: [PATCH] Replace \n with a new line, as heroku program does not do it well. --- GetHerokuVars.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GetHerokuVars.sh b/GetHerokuVars.sh index 93daf1a0687..c8c95512f87 100755 --- a/GetHerokuVars.sh +++ b/GetHerokuVars.sh @@ -14,5 +14,9 @@ APP_NAME=$(heroku apps -A --json | jq '.[] | .["name"]' | sed -e 's/\"//g') echo $APP_NAME heroku config -a $APP_NAME -s| grep -v "STORAGE_URI\|MONGO_CONNECTION\|MONGO$\|MONGOLAB_URI\|MONGODB_URI" | sed -e 's/^/export /' > heroku_vars.txt +# the command below replaces \n with a new line and that is why it is using two lines +sed -i 's/\\n/\ +/g' heroku_vars.txt + echo "new vars are in the file heroku_vars.txt." echo "Please look at it, and if all is ok, try copying it to /etc/nsconfig"