Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bass does not track unset variables #47

Closed
daveyarwood opened this issue Aug 8, 2017 · 1 comment
Closed

Bass does not track unset variables #47

daveyarwood opened this issue Aug 8, 2017 · 1 comment

Comments

@daveyarwood
Copy link
Contributor

I'm building some tooling around bass, and I noticed that when sourcing a bash script that unsets environment variables (e.g. for clearing sensitive information once it's no longer needed), bass does not remove the variable from the fish environment.

I'm happy to contribute a PR if needed -- I took a quick look at __bass.py, and it looks like we're taking a JSON dump of the environment before and after running the script, so it ought to just be a matter of iterating through each var in old_env that does not exist in new_env and adding set -e $var_name to the script to be sourced in the fish environment.

@daveyarwood
Copy link
Contributor Author

#48 fixes this for me when I make the change to __bass.py locally.

@edc edc closed this as completed in #48 Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant