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

envchain --list without namespace contains duplicate entries #24

Closed
sean-nixon opened this issue Apr 27, 2020 · 2 comments · Fixed by #27
Closed

envchain --list without namespace contains duplicate entries #24

sean-nixon opened this issue Apr 27, 2020 · 2 comments · Fixed by #27

Comments

@sean-nixon
Copy link

When I run envchain --list, it seems to contain duplicate entries based on the number of environment variables set in the namespace. For example:

$ envchain
envchain version 1.0.1
...
$ envchain --set test ENV1 ENV2
test.ENV1: hello
test.ENV2: world
$ envchain --list
test
test
@sean-nixon sean-nixon changed the title envchain --list contains duplicate entries envchain --list without namespace contains duplicate entries May 20, 2020
@sean-nixon
Copy link
Author

I've since realized that if I specify a namespace, then it lists the environment variables as expected:

test.ENV1: hello
test.ENV2: world
$ envchain --list test
ENV1
ENV2

So this issue would be more targeted at a feature request to make envchain --list with no namespace argument display a clean list of existing namespaces without duplicates. I've updated the title accordingly.

@haakonstorm
Copy link

If you are on macOS, workaround with pure bash/zsh:

security dump-keychain ~/Library/Keychains/login.keychain-db|tr '=' '\n'|grep -E 'envchain-'|sort|uniq

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

Successfully merging a pull request may close this issue.

2 participants