@safedep/pmg 0.4.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/install.js +10 -1
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -109,7 +109,16 @@ function extractArchive(archivePath, extractDir) {
109
109
  const isZip = archivePath.endsWith(".zip");
110
110
 
111
111
  if (isZip) {
112
- execSync(`unzip -o "${archivePath}" -d "${extractDir}"`, { stdio: "pipe" });
112
+ if (process.platform === "win32") {
113
+ execSync(
114
+ `powershell -NoProfile -Command "Expand-Archive -Force -Path '${archivePath}' -DestinationPath '${extractDir}'"`,
115
+ { stdio: "pipe" },
116
+ );
117
+ } else {
118
+ execSync(`unzip -o "${archivePath}" -d "${extractDir}"`, {
119
+ stdio: "pipe",
120
+ });
121
+ }
113
122
  } else {
114
123
  execSync(`tar -xzf "${archivePath}" -C "${extractDir}"`, { stdio: "pipe" });
115
124
  }
package/package.json CHANGED
@@ -54,5 +54,5 @@
54
54
  "access": "public"
55
55
  },
56
56
  "dependencies": {},
57
- "version": "0.4.5"
57
+ "version": "0.5.0"
58
58
  }