diff --git a/src/lib/install-daemon/binary-installation.integration.spec.ts b/src/lib/install-daemon/binary-installation.integration.spec.ts index d390917..130f804 100644 --- a/src/lib/install-daemon/binary-installation.integration.spec.ts +++ b/src/lib/install-daemon/binary-installation.integration.spec.ts @@ -238,6 +238,7 @@ describe('binary installation - PowerShell Expand-Archive on Windows', () => { tempDirs.length = 0 }) + // PowerShell cold start on CI Windows runners takes several seconds per spawn (two here). skipOnUnix( 'should extract .zip archives using PowerShell Expand-Archive on Windows', () => { @@ -251,7 +252,7 @@ describe('binary installation - PowerShell Expand-Archive on Windows', () => { // Create zip using PowerShell const archivePath = join(tempDir, 'centy-daemon.zip') execSync( - `powershell -Command "Compress-Archive -Path '${join(srcDir, 'centy-daemon.exe')}' -DestinationPath '${archivePath}'"`, + `powershell -NoProfile -NonInteractive -Command "Compress-Archive -Path '${join(srcDir, 'centy-daemon.exe')}' -DestinationPath '${archivePath}'"`, { stdio: 'pipe' } ) @@ -259,7 +260,8 @@ describe('binary installation - PowerShell Expand-Archive on Windows', () => { extractArchive(archivePath, destDir) expect(existsSync(join(destDir, 'centy-daemon.exe'))).toBe(true) - } + }, + 30000 ) }) diff --git a/src/lib/install-daemon/extract.ts b/src/lib/install-daemon/extract.ts index 47a6495..3b235e1 100644 --- a/src/lib/install-daemon/extract.ts +++ b/src/lib/install-daemon/extract.ts @@ -24,7 +24,7 @@ function extractZip(archivePath: string, destDir: string): void { ensureDir(destDir) if (isWindows()) { execSync( - `powershell -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force"`, + `powershell -NoProfile -NonInteractive -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force"`, { stdio: 'pipe' } ) } else {