diff --git a/scripts/package-store.mjs b/scripts/package-store.mjs index 29ce51f..0b9cd67 100644 --- a/scripts/package-store.mjs +++ b/scripts/package-store.mjs @@ -74,8 +74,17 @@ async function copyRequiredFiles() { } function createZip(stagingDir, zipPath) { - const command = `Compress-Archive -Path * -DestinationPath '${zipPath.replace(/'/g, "''")}' -Force`; - execFileSync('powershell', ['-NoProfile', '-Command', command], { + const executable = process.platform === 'win32' ? 'powershell' : 'zip'; + const args = + process.platform === 'win32' + ? [ + '-NoProfile', + '-Command', + `Compress-Archive -Path * -DestinationPath '${zipPath.replace(/'/g, "''")}' -Force`, + ] + : ['-r', zipPath, '.']; + + execFileSync(executable, args, { cwd: stagingDir, stdio: 'inherit', });