Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/cli/src/commands/pip/cmd-pip.mts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { WIN32 } from '@socketsecurity/lib-internal/constants/platform'
import { spawn } from '@socketsecurity/lib-internal/spawn'

import { commonFlags } from '../../flags.mts'
import { spawnNode } from '../../utils/spawn/spawn-node.mts'
import { meowOrExit } from '../../utils/cli/with-subcommands.mjs'
import { resolveSfw } from '../../utils/dlx/resolve-binary.mjs'
import { filterFlags } from '../../utils/process/cmd.mts'
Expand Down Expand Up @@ -108,7 +109,7 @@ async function run(
// Use local sfw if available, otherwise use pnpm dlx.
const result =
resolution.type === 'local'
? await spawn('node', [resolution.path, 'pip', ...argsToForward], {
? await spawnNode([resolution.path, 'pip', ...argsToForward], {
shell: WIN32,
stdio: 'inherit',
})
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/utils/dlx/spawn.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

import { SOCKET_PUBLIC_API_TOKEN } from '@socketsecurity/lib/constants/socket'
import { dlxPackage } from '@socketsecurity/lib/dlx-package'
import { spawn } from '@socketsecurity/lib/spawn'

import { resolveCdxgen, resolveCoana } from './resolve-binary.mjs'
import { spawnNode } from '../spawn/spawn-node.mts'
import { getDefaultOrgSlug } from '../../commands/ci/fetch-default-org-slug.mjs'
import ENV from '../../constants/env.mts'
import {
Expand Down Expand Up @@ -133,7 +133,7 @@ export async function spawnCoanaDlx(
...mixinsEnv,
...spawnEnv,
}
const spawnResult = await spawn('node', [resolution.path, ...args], {
const spawnResult = await spawnNode([resolution.path, ...args], {
cwd: dlxOptions.cwd,
env: finalEnv,
stdio: spawnExtra?.['stdio'] || 'inherit',
Expand Down Expand Up @@ -202,7 +202,7 @@ export async function spawnCdxgenDlx(
...options,
} as DlxOptions

const spawnResult = spawn('node', [resolution.path, ...args], {
const spawnResult = spawnNode([resolution.path, ...args], {
cwd: dlxOptions.cwd,
env: {
...process.env,
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/utils/python/standalone.mts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import ENV from '../../constants/env.mts'
import { PYTHON_MIN_VERSION } from '../../constants/packages.mts'
import { resolvePyCli } from '../dlx/resolve-binary.mjs'
import { getErrorCause, InputError } from '../error/errors.mts'
import { spawnNode } from '../spawn/spawn-node.mts'

import type { CResult } from '../../types.mjs'

Expand Down Expand Up @@ -388,7 +389,7 @@ export async function spawnSocketPython(

// Use local Python CLI if available.
if (resolution.type === 'local') {
const spawnResult = await spawn('node', [resolution.path, ...args], {
const spawnResult = await spawnNode([resolution.path, ...args], {
cwd: options?.cwd,
env: finalEnv,
shell: WIN32,
Expand Down
Loading