MCPcopy Create free account
hub / github.com/Azure/powershell / unzipUsing7Zip

Method unzipUsing7Zip

src/Utilities/ArchiveTools.ts:21–28  ·  view source on GitHub ↗
(zipPath: string, destination: string)

Source from the content-addressed store, hash-verified

19 }
20
21 private async unzipUsing7Zip(zipPath: string, destination: string) {
22 debug(`Using 7zip to extract ${zipPath} to ${destination}`);
23 const path7Zip = await which("7z.exe", true);
24 const exitCode = await exec(`${path7Zip} x -o${destination} ${zipPath}`);
25 if (exitCode != 0) {
26 throw new Error(`Extraction using 7zip failed from ${zipPath} to ${destination}`);
27 }
28 }
29
30 private async unzipUsingPowerShell(zipPath: string, destination: string) {
31 debug(`Using powershell Expand-Archive cmdlet to extract ${zipPath} to ${destination}`);

Callers 1

unzipMethod · 0.95

Calls 3

debugFunction · 0.85
whichFunction · 0.85
execFunction · 0.85

Tested by

no test coverage detected