test(windows): invoke quoted retention fixture via PowerShell

This commit is contained in:
Neil
2026-08-31 05:43:11 -07:00
parent 63cea78c35
commit 5151e3a5ee
@@ -97,7 +97,8 @@ function shellQuote(value: string): string {
export function retentionFixtureCommand(fixturePath: string, sinkPath: string): string {
const command = [process.execPath, fixturePath, sinkPath]
return process.platform === 'win32'
? command.map((value) => `"${value.replaceAll('"', '""')}"`).join(' ')
? // PowerShell needs the call operator when the executable is quoted; cmd.exe also accepts it.
`& ${command.map((value) => `"${value.replaceAll('"', '""')}"`).join(' ')}`
: command.map(shellQuote).join(' ')
}