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

Using exec with invalid profile name does not error #1248

Open
pjroth opened this issue Jul 17, 2024 · 0 comments
Open

Using exec with invalid profile name does not error #1248

pjroth opened this issue Jul 17, 2024 · 0 comments

Comments

@pjroth
Copy link

pjroth commented Jul 17, 2024

If I use a profile name that doesn't exist in my ~/.aws/config file (note I do not have a ~/.aws/credentials file), aws-vault does not error and gives me credentials. Here is an example (I hid the actual AWS credentials via the grep but they are indeed set on the shell):

❯ aws-vault exec invalid-profile-name -- env |grep AWS_VAULT
AWS_VAULT=invalid-profile-name

Expected behavior:
I would expect aws-vault to error (return non-zero code to the shell) along with a useful error message since I provided an invalid profile name. This expected behavior is similar to what AWS CLI does. For example, the AWS CLI provides a useful error message when given an invalid profile as follows:

❯ AWS_PROFILE=invalid-profile-name aws s3 ls

The config profile (invalid-profile-name) could not be found
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

No branches or pull requests

1 participant