Cox-Automotive/alks-cli

If ~/.aws/credentials file does not exists cli bugs out

Closed this issue ยท 2 comments

When file does not exist:

Error encountered during database keys transaction! Swallowing to preserve file integrity.
{ [Error: EEXIST: file already exists, mkdir '/Users/smuggla/.aws']
  errno: -17,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: '/Users/smuggla/.aws' }

I just tested this out and it appears to work as expected:

๐Ÿ”  mv ~/.aws ~/.awss
๐Ÿ”  alks sessions open -o creds -n test
๐Ÿ”  la ~/.aws/credentials 
-rw-r--r--  1 brianantonelli  staff  677 May 18 14:05 /Users/brianantonelli/.aws/credentials

file

This still occurs

$ rm .aws/credentials
$ alks sessions open -o creds -f -i
ALKS v2.10.2
? Please select an ALKS account/role 1) Do/Stuff - Stuff
Resuming existing session in Do/Stuff - Stuff

Error encountered during database keys transaction! Swallowing to preserve file integrity.
{ [Error: EEXIST: file already exists, mkdir '/Users/smuggla/.aws']
  errno: -17,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: '/Users/smuggla/.aws' }