Dedupe shell command execution logic (#17516)

* Moved to shellExecutionHelper

* First crack

* fixed the deploy tests

* PR comments

* trigger GitHub actions

Co-authored-by: llali <llali@microsoft.com>
This commit is contained in:
Benjin Dubishar
2021-11-04 20:16:58 -04:00
committed by GitHub
parent f07427f2c1
commit 5160814623
7 changed files with 100 additions and 107 deletions

View File

@@ -51,7 +51,7 @@ export class AutorestHelper extends ShellExecutionHelper {
if (response === constants.installGlobally) {
this._outputChannel.appendLine(constants.userSelectionInstallGlobally);
await this.runStreamedCommand('npm install autorest -g', this._outputChannel);
await this.runStreamedCommand('npm install autorest -g');
return autorestCommand;
} else if (response === constants.runViaNpx) {
this._outputChannel.appendLine(constants.userSelectionRunNpx);
@@ -99,7 +99,7 @@ export class AutorestHelper extends ShellExecutionHelper {
}
const command = this.constructAutorestCommand(commandExecutable, specPath, outputFolder);
const output = await this.runStreamedCommand(command, this._outputChannel);
const output = await this.runStreamedCommand(command);
return output;
}