@unitsvc/cc-helper 1.0.8 → 1.0.9
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.
- package/bin/cc-helper.js +2 -1
- package/package.json +1 -1
package/bin/cc-helper.js
CHANGED
|
@@ -237,9 +237,10 @@ function extractZip(zipPath, destDir) {
|
|
|
237
237
|
if (process.platform === 'win32') {
|
|
238
238
|
// Use PowerShell on Windows (built-in, no external dependencies)
|
|
239
239
|
// Use single-line command to avoid PowerShell multi-line parsing issues
|
|
240
|
+
// Disable progress bar to avoid Write-Progress IndexOutOfRangeException bug in PowerShell 5.1
|
|
240
241
|
const escapedZipPath = zipPath.replace(/'/g, "''");
|
|
241
242
|
const escapedDestDir = destDir.replace(/'/g, "''");
|
|
242
|
-
const psCommand =
|
|
243
|
+
const psCommand = `$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${escapedZipPath}' -DestinationPath '${escapedDestDir}' -Force -ErrorAction Stop`;
|
|
243
244
|
execSync(`powershell -NoProfile -ExecutionPolicy Bypass -Command "${psCommand}"`, { stdio: 'pipe' });
|
|
244
245
|
} else {
|
|
245
246
|
// Unix/Linux/macOS - use unzip
|