Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed bug due to missing await
  • Loading branch information
amit-avit authored Mar 17, 2021
commit 50f4ea769b4ff34f92d0909d28b08a4b4e652521
2 changes: 1 addition & 1 deletion lib/Utilities/ArchiveTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ArchiveTools {
$ProgressPreference = 'SilentlyContinue'
Expand-Archive -Path ${zipPath} -DestinationPath ${destination}
$ProgressPreference = $prevProgressPref`;
PowerShellToolRunner_1.default.init();
yield PowerShellToolRunner_1.default.init();
const exitCode = yield PowerShellToolRunner_1.default.executePowerShellScriptBlock(script);
if (exitCode != 0) {
throw new Error(`Extraction using Expand-Archive cmdlet failed from ${zipPath} to ${destination}`);
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/ArchiveTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class ArchiveTools {
$ProgressPreference = 'SilentlyContinue'
Expand-Archive -Path ${zipPath} -DestinationPath ${destination}
$ProgressPreference = $prevProgressPref`;
PowerShellToolRunner.init();
await PowerShellToolRunner.init();
const exitCode = await PowerShellToolRunner.executePowerShellScriptBlock(script);
if (exitCode != 0) {
throw new Error(`Extraction using Expand-Archive cmdlet failed from ${zipPath} to ${destination}`);
Expand Down