Skip to content

Commit

Permalink
fix(amplify-provider-awscloudformation): check proj config b4 env vars (
Browse files Browse the repository at this point in the history
  • Loading branch information
jhockett committed Feb 8, 2021
1 parent a16e8b8 commit a66bd14
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -741,6 +741,10 @@ async function determineAuthFlow(context: $TSContext, projectConfig?: ProjectCon
useProfile: boolean;
} = cfnParams || {};

// Check for local project config
useProfile = useProfile ?? projectConfig?.config?.useProfile;
profileName = profileName ?? projectConfig?.config?.profileName;

if (context?.exeInfo?.inputParams?.yes) {
if (process.env.AWS_SDK_LOAD_CONFIG) {
useProfile = useProfile === undefined ? true : useProfile;
Expand All @@ -752,10 +756,6 @@ async function determineAuthFlow(context: $TSContext, projectConfig?: ProjectCon
region = region || resolveRegion();
}

// Check for local project config
useProfile = useProfile ?? projectConfig?.config?.useProfile;
profileName = profileName ?? projectConfig?.config?.profileName;

if (useProfile && profileName) {
return { type: 'profile', profileName };
}
Expand Down

0 comments on commit a66bd14

Please sign in to comment.