Skip to content

Instantly share code, notes, and snippets.

@iamnader
Created August 28, 2018 19:15
Show Gist options
  • Save iamnader/ecf1f28f8f7b995e234f87e1533805fc to your computer and use it in GitHub Desktop.
Save iamnader/ecf1f28f8f7b995e234f87e1533805fc to your computer and use it in GitHub Desktop.
Script to find unused env vars
app=my-app
for var in `heroku config -a $app --json | jq '. | keys | .[]' -r`
do
if ! ag $var `bundle show --paths` . --count --silent --nofilename >/dev/null;
then echo $var;
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment