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

Change error string if aws config path is changed #39

Merged

Conversation

lukemassa
Copy link
Contributor

The code respects AWS_CONFIG_FILE but the error message for missing profile doesn't show that.

This also makes the error message for the default config file show the file with its absolute path, which seems fine to me but I wanted to call out as a change in behavior.

Before:

LMASSA-MAC:aws2wrap luke$ python3 __init__.py --profile default
LMASSA-MAC:aws2wrap luke$ python3 __init__.py --profile nonexistentprofile
Cannot find profile 'nonexistentprofile' in ~/.aws/config
LMASSA-MAC:aws2wrap luke$ AWS_CONFIG_FILE=/path/to/non/existent/file python3 __init__.py --profile default
Cannot find profile 'default' in ~/.aws/config

After:

LMASSA-MAC:aws2wrap luke$ python3 __init__.py --profile default
LMASSA-MAC:aws2wrap luke$ python3 __init__.py --profile nonexistentprofile
Cannot find profile 'nonexistentprofile' in /Users/luke/.aws/config
LMASSA-MAC:aws2wrap luke$ AWS_CONFIG_FILE=/path/to/non/existent/file python3 __init__.py --profile default
Cannot find profile 'default' in /path/to/non/existent/file

@sonarcloud
Copy link

sonarcloud bot commented Jun 22, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@pcolmer
Copy link
Contributor

pcolmer commented Jun 25, 2021

Thanks, @lukemassa, for your contribution.

@pcolmer pcolmer merged commit 47d2b97 into linaro-its:master Jun 25, 2021
pcolmer pushed a commit that referenced this pull request Jun 25, 2021
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

2 participants