Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brightredchilli/658d26e379ef8e05ff8c63e72d0fadf7 to your computer and use it in GitHub Desktop.
Save brightredchilli/658d26e379ef8e05ff8c63e72d0fadf7 to your computer and use it in GitHub Desktop.
Heroku config into env var format
# Use awk to remove spaces. strips the trailing ":" from the first column
# adds quotes around the second.
heroku config --remote staging | grep -v "Config Vars" | awk '{print substr($1, 1, length($1)-1)"=""\""$2"\""}' > .env.developmen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment