File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import { getNpmBinPath } from '../shadow/npm/paths'
1515
1616import type { Spinner } from '@socketsecurity/registry/lib/spinner'
1717
18- const { SOCKET_IPC_HANDSHAKE } = constants
18+ const { SOCKET_CLI_SENTRY_BUILD , SOCKET_IPC_HANDSHAKE } = constants
1919
2020type SpawnOption = Exclude < Parameters < typeof spawn > [ 2 ] , undefined >
2121
@@ -51,6 +51,14 @@ export function safeNpmInstall(options?: SafeNpmInstallOptions) {
5151 ...constants . nodeHardenFlags ,
5252 // Lazily access constants.nodeNoWarningsFlags.
5353 ...constants . nodeNoWarningsFlags ,
54+ // Lazily access constants.ENV[SOCKET_CLI_SENTRY_BUILD].
55+ ...( constants . ENV [ SOCKET_CLI_SENTRY_BUILD ]
56+ ? [
57+ '--require' ,
58+ // Lazily access constants.distInstrumentWithSentryPath.
59+ constants . distInstrumentWithSentryPath
60+ ]
61+ : [ ] ) ,
5462 '--require' ,
5563 // Lazily access constants.distShadowNpmInjectPath.
5664 constants . distShadowNpmInjectPath ,
You can’t perform that action at this time.
0 commit comments