Skip to content

Commit

Permalink
profile lookup fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed Sep 18, 2020
1 parent 2c78292 commit db3a180
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AWS.SingleSignOnCredentials = AWS.util.inherit(AWS.Credentials, {
process.env.AWS_CONFIG_FILE ||
path.join(os.homedir(), ".aws", "config");
var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, filepath);
var profile = profiles[profileName === "default" ? "default" : "profile " + profileName] || {};
var profile = profiles[profileName] || {};

if (Object.keys(profile).length === 0) {
throw AWS.util.error(
Expand Down
7 changes: 1 addition & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mhlabs/aws-sdk-sso",
"version": "0.0.11",
"version": "0.0.12",
"description": "Credentials provider for AWS Single Sign-On",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -31,4 +31,4 @@
"publishConfig": {
"access": "public"
}
}
}

0 comments on commit db3a180

Please sign in to comment.