Skip to content

Commit

Permalink
Revert "fix(amplify-provider-awscloudformation): display mfa prompt (#…
Browse files Browse the repository at this point in the history
…7866)" (#8054)

This reverts commit 8947b18.

The original commit was causing E2E test failures.

Co-authored-by: Colin Ihrig <colihrig@amazon.com>
  • Loading branch information
cjihrig and cjihrig-aws authored Aug 27, 2021
1 parent b40faa7 commit 7b5de7b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export class SSMClientWrapper {

const getSSMClient = async (context: $TSContext) => {
const spinner = ora('Initializing SSM Client');
context.exeInfo.spinner = spinner;
try {
spinner.start();

Expand Down
1 change: 0 additions & 1 deletion packages/amplify-cli/src/commands/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const spinner = ora('');
// to push his local developments
async function syncCurrentCloudBackend(context: $TSContext) {
context.exeInfo.restoreBackend = false;
context.exeInfo.spinner = spinner;

const currentEnv = context.exeInfo.localEnvInfo.envName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function getRoleCredentials(context: $TSContext, profileName: string, prof
context.print.info(` ${profileConfig.role_arn}`);
context.print.info('It requires MFA authentication. The MFA device is');
context.print.info(` ${profileConfig.mfa_serial}`);
mfaTokenCode = await getMfaTokenCode(context);
mfaTokenCode = await getMfaTokenCode();
}
logger('getRoleCredentials.aws.STS', [sourceProfileAwsConfig])();
const sts = new aws.STS(sourceProfileAwsConfig);
Expand Down Expand Up @@ -156,11 +156,7 @@ async function getRoleCredentials(context: $TSContext, profileName: string, prof
return roleCredentials;
}

async function getMfaTokenCode(context) {
let spinner;
if (context.exeInfo.spinner && context.exeInfo.spinner.isSpinning) {
spinner = context.exeInfo.spinner.stopAndPersist();
}
async function getMfaTokenCode() {
const inputMfaTokenCode = {
type: 'input',
name: 'tokenCode',
Expand All @@ -178,7 +174,6 @@ async function getMfaTokenCode(context) {
},
};
const answer = await inquirer.prompt(inputMfaTokenCode);
if (spinner) spinner.start();
return answer.tokenCode;
}

Expand Down

0 comments on commit 7b5de7b

Please sign in to comment.