Skip to content

Commit 795169d

Browse files
jdaltonclaude
andcommitted
debug: add Windows CI debugging for optimize test failures
Add debug logging to help diagnose why optimize tests are failing on Windows with exit code 1. This will show: - Whether CI is detected correctly on Windows - What install arguments are being passed to pnpm - The state of environment variables 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3d91be5 commit 795169d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/utils/agent.mts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,22 @@ export function runAgentInstall(
4040
const skipNodeHardenFlags = isPnpm && pkgEnvDetails.agentVersion.major < 11
4141
// In CI mode, pnpm uses --frozen-lockfile by default, which prevents lockfile updates.
4242
// We need to explicitly disable it when updating the lockfile with overrides.
43-
const installArgs = isPnpm && constants.ENV.CI
43+
const isCi = constants.ENV.CI
44+
const installArgs = isPnpm && isCi
4445
? ['install', '--no-frozen-lockfile', ...args]
4546
: ['install', ...args]
4647

48+
// Debug logging for Windows CI issues.
49+
if (constants.WIN32 && (isCi || process.env.SOCKET_CLI_DEBUG)) {
50+
console.error(`[DEBUG] Windows runAgentInstall:`)
51+
console.error(` agent: ${agent}`)
52+
console.error(` isPnpm: ${isPnpm}`)
53+
console.error(` isCi: ${isCi}`)
54+
console.error(` constants.ENV.CI: ${constants.ENV.CI}`)
55+
console.error(` process.env.CI: ${process.env.CI}`)
56+
console.error(` installArgs: ${JSON.stringify(installArgs)}`)
57+
}
58+
4759
return spawn(agentExecPath, installArgs, {
4860
cwd: pkgPath,
4961
shell: constants.WIN32,

0 commit comments

Comments
 (0)