Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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',
() => {
Expand All @@ -251,15 +252,16 @@ 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' }
)

const destDir = join(tempDir, 'dest')
extractArchive(archivePath, destDir)

expect(existsSync(join(destDir, 'centy-daemon.exe'))).toBe(true)
}
},
30000
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/lib/install-daemon/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading