(zipPath, destination)
| 8086 | }); |
| 8087 | } |
| 8088 | unzipUsingPowerShell(zipPath, destination) { |
| 8089 | return __awaiter(this, void 0, void 0, function* () { |
| 8090 | (0, core_1.debug)(`Using powershell Expand-Archive cmdlet to extract ${zipPath} to ${destination}`); |
| 8091 | const script = ` |
| 8092 | $prevProgressPref = $ProgressPreference |
| 8093 | $ProgressPreference = 'SilentlyContinue' |
| 8094 | Expand-Archive -Path ${zipPath} -DestinationPath ${destination} |
| 8095 | $ProgressPreference = $prevProgressPref`; |
| 8096 | const exitCode = yield PowerShellToolRunner_1.default.executePowerShellScriptBlock(script); |
| 8097 | if (exitCode != 0) { |
| 8098 | throw new Error(`Extraction using Expand-Archive cmdlet failed from ${zipPath} to ${destination}`); |
| 8099 | } |
| 8100 | }); |
| 8101 | } |
| 8102 | } |
| 8103 | exports.ArchiveTools = ArchiveTools; |
| 8104 |
no test coverage detected