From 45b646fbba1602945dbfef3f35b459314b4a1d78 Mon Sep 17 00:00:00 2001 From: aksm-ms <58936966+aksm-ms@users.noreply.github.com> Date: Wed, 13 May 2020 11:19:32 +0530 Subject: [PATCH] changes in PowerShellToolRunner (#32) --- lib/PowerShell/Utilities/PowerShellToolRunner.js | 2 +- lib/main.js | 2 +- src/PowerShell/Utilities/PowerShellToolRunner.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PowerShell/Utilities/PowerShellToolRunner.js b/lib/PowerShell/Utilities/PowerShellToolRunner.js index 2bee28fd..887da464 100644 --- a/lib/PowerShell/Utilities/PowerShellToolRunner.js +++ b/lib/PowerShell/Utilities/PowerShellToolRunner.js @@ -28,7 +28,7 @@ class PowerShellToolRunner { } static executePowerShellScriptBlock(scriptBlock, options = {}) { return __awaiter(this, void 0, void 0, function* () { - yield exec.exec(`${PowerShellToolRunner.psPath} -Command`, [scriptBlock], options); + yield exec.exec(`"${PowerShellToolRunner.psPath}" -Command`, [scriptBlock], options); }); } } diff --git a/lib/main.js b/lib/main.js index d9c3b873..c546ef0f 100644 --- a/lib/main.js +++ b/lib/main.js @@ -87,4 +87,4 @@ function executeAzCliCommand(command, silent) { } }); } -main(); \ No newline at end of file +main(); diff --git a/src/PowerShell/Utilities/PowerShellToolRunner.ts b/src/PowerShell/Utilities/PowerShellToolRunner.ts index dd08b2a2..e8364f32 100644 --- a/src/PowerShell/Utilities/PowerShellToolRunner.ts +++ b/src/PowerShell/Utilities/PowerShellToolRunner.ts @@ -11,6 +11,6 @@ export default class PowerShellToolRunner { } static async executePowerShellScriptBlock(scriptBlock: string, options: any = {}) { - await exec.exec(`${PowerShellToolRunner.psPath} -Command`, [scriptBlock], options) + await exec.exec(`"${PowerShellToolRunner.psPath}" -Command`, [scriptBlock], options) } } \ No newline at end of file