Skip to content

Commit aed9b9e

Browse files
jamesgeorge007ematipico
authored andcommitted
chore: Minor code refactor adhering to ES6 semantics (#1122)
* chore: use object destructuring * chore: remove unwanted explicit boolean check * chore: use object destructuring assignment * chore: minor refactor * chore: revert * chore: revert * chore: minor tweak * chore: revert
1 parent 8aa1b7d commit aed9b9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/commands/external.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ExternalCommand {
3939
const commandToBeRun = `${packageManager} ${options.join(' ')}`;
4040
process.cliLogger.error(`The command moved into a separate package: ${chalk.keyword('orange')(name)}\n`);
4141
const question = `Would you like to install ${name}? (That will run ${chalk.green(commandToBeRun)})`;
42-
const answer = await prompt([
42+
const { installConfirm } = await prompt([
4343
{
4444
type: 'confirm',
4545
name: 'installConfirm',
@@ -48,7 +48,7 @@ class ExternalCommand {
4848
choices: ['Yes', 'No', 'Y', 'N', 'y', 'n'],
4949
},
5050
]);
51-
if (answer.installConfirm === true) {
51+
if (installConfirm === true) {
5252
await ExternalCommand.runCommand(commandToBeRun);
5353
return ExternalCommand.validateEnv(name);
5454
}

0 commit comments

Comments
 (0)