1
0
mirror of https://github.com/bitwarden/cli synced 2025-12-12 14:23:32 +00:00

formatting

This commit is contained in:
Kyle Spearrin
2018-06-18 22:11:05 -04:00
parent c7160c0870
commit 04b63d16ee
2 changed files with 14 additions and 12 deletions

2
jslib

Submodule jslib updated: c3ad9b9b7d...e5db01083c

View File

@@ -89,12 +89,13 @@ export class LoginCommand {
const options = twoFactorProviders.map((p) => p.name);
options.push(new inquirer.Separator());
options.push('Cancel');
const answer: inquirer.Answers = await inquirer.createPromptModule({ output: process.stderr })({
type: 'list',
name: 'method',
message: 'Two-step login method:',
choices: options,
});
const answer: inquirer.Answers =
await inquirer.createPromptModule({ output: process.stderr })({
type: 'list',
name: 'method',
message: 'Two-step login method:',
choices: options,
});
const i = options.indexOf(answer.method);
if (i === (options.length - 1)) {
return Response.error('Login failed.');
@@ -111,11 +112,12 @@ export class LoginCommand {
}
if (twoFactorToken == null) {
const answer: inquirer.Answers = await inquirer.createPromptModule({ output: process.stderr })({
type: 'input',
name: 'token',
message: 'Two-step login code:',
});
const answer: inquirer.Answers =
await inquirer.createPromptModule({ output: process.stderr })({
type: 'input',
name: 'token',
message: 'Two-step login code:',
});
twoFactorToken = answer.token;
if (twoFactorToken == null || twoFactorToken === '') {
return Response.badRequest('Code is required.');