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

Expand pass dir path #86

Merged
merged 1 commit into from Jan 27, 2022
Merged

Expand pass dir path #86

merged 1 commit into from Jan 27, 2022

Conversation

benjamb
Copy link
Contributor

@benjamb benjamb commented Jun 9, 2021

While you can avoid using --opt=value format to ensure ~ gets expanded by the shell, it was irritating enough for me to contribute this small change.

@mtibben
Copy link
Member

mtibben commented Oct 11, 2021

~ is expanded by the shell. Expanding ~ and none of the other shell expansions seems arbitrary

@benjamb
Copy link
Contributor Author

benjamb commented Oct 11, 2021

~ doesn't get expanded by the shell when you pass options in the format of --opt=value, i.e. --pass-dir=~/.pass/awsvault/.

I based the implementation off the code here: https://github.com/99designs/keyring/blob/master/file.go#L43

@mtibben mtibben merged commit 2e56fec into 99designs:master Jan 27, 2022
@benjamb benjamb deleted the benbrown/expand-paths branch January 27, 2022 08:55
@agargiulo
Copy link

I based the implementation off the code here: https://github.com/99designs/keyring/blob/master/file.go#L43

Ironically, your change at least properly ignores ~agargiulo/ for expansion while the thing you linked breaks:

[~] $ aws-vault --backend=file --file-dir=~agargiulo/thisCanNotWorkCanIt  list
aws-vault: error: list: mkdir /Users/agargiuloagargiulo: permission denied

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 this pull request may close these issues.

None yet

3 participants