Skip to content

Commit 28bad9e

Browse files
committed
fix(deps): use socket-lib 1.3.5 with Windows Proxy fix
Link to local socket-lib which includes the fix to preserve Windows process.env Proxy behavior. This allows us to revert the socket-cli workaround and use the standard env spreading pattern. The fix is now in socket-lib where it belongs, benefiting all consumers. Socket-lib changes: - Only spread process.env when merging custom env vars - Use process.env directly when no custom env provided - Preserves Windows case-insensitive env access (PATH vs Path) Related: socket-lib commit 5511966
1 parent e2fc175 commit 28bad9e

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@socketregistry/packageurl-js": "1.3.0",
3333
"@socketregistry/yocto-spinner": "1.0.24",
3434
"@socketsecurity/config": "3.0.1",
35-
"@socketsecurity/lib": "1.3.4",
35+
"@socketsecurity/lib": "link:../socket-lib",
3636
"@socketsecurity/registry": "2.0.0",
3737
"@socketsecurity/sdk": "3.0.6",
3838
"@types/cmd-shim": "5.0.2",

packages/cli/test/utils.mts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,13 @@ export async function spawnSocketCli(
266266
const commandArgs = isJsFile ? [entryPath, ...args] : args
267267

268268
try {
269-
// Only pass env if we have custom environment variables.
270-
// The spawn function from @socketsecurity/lib/spawn ALWAYS spreads
271-
// process.env first (line 622), then spreads our env on top.
272-
// If we pass env with spread process.env, it gets spread multiple times
273-
// losing Windows Proxy behavior. By passing undefined, spawn uses
274-
// process.env directly without any spreading.
275-
const env = spawnEnv ? { ...constants.processEnv, ...spawnEnv } : undefined
276-
277269
const output = await spawn(command, commandArgs, {
278270
cwd,
279-
env,
271+
env: {
272+
...process.env,
273+
...constants.processEnv,
274+
...spawnEnv,
275+
},
280276
...restOptions,
281277
// Close stdin to prevent tests from hanging
282278
// when commands wait for input. Must be after restOptions

pnpm-lock.yaml

Lines changed: 2 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)