Closed benjamb closed 2 years ago
~
is expanded by the shell. Expanding ~
and none of the other shell expansions seems arbitrary
~
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
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
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.