kherge / rs.aws-login

A command line utility to simplify logging into AWS services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing `~/.config/aws-login/templates.json` file is not handled gracefully.

kherge opened this issue · comments

The following checks have been done.

  • I could not find another bug report that covers what I discovered.
  • This report does not request new features or enhancements.

What is the current behavior?

The use subcommand produces an error if no existing AWS CLI profiles are found and the profile templates file does not exist.

$ aws-login use
Could not get a list of existing AWS CLI profiles.
  No such file or directory (os error 2)

What is the expected behavior?

The subcommand should detect this scenario and display a more elegant error message.

$ aws-login use
There are no profiles available.

Some additional context.

No response

I am unable to reproduce this issue anymore and I suspect that it has something to do with #14.