fix(ci): unblock windows portability follow-up

This commit is contained in:
Jeremy 2026-04-10 20:45:51 -05:00
parent 61204ce771
commit 153ed252fe
3 changed files with 8 additions and 0 deletions

View file

@ -26,6 +26,7 @@ function runNpm(args, options = {}) {
return execFileSync(getNpmCommand(), args, {
cwd: ROOT,
encoding: 'utf8',
shell: process.platform === 'win32',
stdio: ['pipe', 'pipe', 'pipe'],
maxBuffer: DEFAULT_MAX_BUFFER,
env: {
@ -125,6 +126,7 @@ try {
const installOutput = execFileSync(getNpmCommand(), ['install', tarball], {
cwd: installDir,
encoding: 'utf8',
shell: process.platform === 'win32',
stdio: ['pipe', 'pipe', 'pipe'],
maxBuffer: DEFAULT_MAX_BUFFER,
env: {

View file

@ -165,6 +165,7 @@ test('launchWebMode prefers the packaged standalone host and opens the resolved
detached: true,
stdio: 'ignore',
windowsHide: true,
shell: false,
env: {
TEST_ENV: '1',
HOSTNAME: '127.0.0.1',

View file

@ -66,8 +66,13 @@ test("Windows launch points use shell-safe shims", () => {
path.join(process.cwd(), "src", "resources", "extensions", "gsd", "pre-execution-checks.ts"),
"utf8",
);
const validatePack = readFileSync(
path.join(process.cwd(), "scripts", "validate-pack.js"),
"utf8",
);
assert.match(gsdClient, /shell:\s*process\.platform === "win32"/);
assert.match(updateService, /npm\.cmd/);
assert.match(preExecution, /npm\.cmd/);
assert.match(validatePack, /shell:\s*process\.platform === 'win32'/);
});