|
| 1 | +import { logger } from '@socketsecurity/registry/lib/logger' |
1 | 2 | import { getOwn } from '@socketsecurity/registry/lib/objects' |
2 | 3 | import { spawn } from '@socketsecurity/registry/lib/spawn' |
3 | 4 | import { Spinner } from '@socketsecurity/registry/lib/spinner' |
@@ -41,19 +42,20 @@ export function runAgentInstall( |
41 | 42 | // In CI mode, pnpm uses --frozen-lockfile by default, which prevents lockfile updates. |
42 | 43 | // We need to explicitly disable it when updating the lockfile with overrides. |
43 | 44 | const isCi = constants.ENV.CI |
44 | | - const installArgs = isPnpm && isCi |
45 | | - ? ['install', '--no-frozen-lockfile', ...args] |
46 | | - : ['install', ...args] |
| 45 | + const installArgs = |
| 46 | + isPnpm && isCi |
| 47 | + ? ['install', '--no-frozen-lockfile', ...args] |
| 48 | + : ['install', ...args] |
47 | 49 |
|
48 | 50 | // 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)}`) |
| 51 | + if (constants.WIN32 && (isCi || process.env['SOCKET_CLI_DEBUG'])) { |
| 52 | + logger.error(`[DEBUG] Windows runAgentInstall:`) |
| 53 | + logger.error(` agent: ${agent}`) |
| 54 | + logger.error(` isPnpm: ${isPnpm}`) |
| 55 | + logger.error(` isCi: ${isCi}`) |
| 56 | + logger.error(` constants.ENV.CI: ${constants.ENV.CI}`) |
| 57 | + logger.error(` process.env.CI: ${process.env['CI']}`) |
| 58 | + logger.error(` installArgs: ${JSON.stringify(installArgs)}`) |
57 | 59 | } |
58 | 60 |
|
59 | 61 | return spawn(agentExecPath, installArgs, { |
|
0 commit comments