File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -166,22 +166,20 @@ export async function performReachabilityAnalysis(
166166 ]
167167
168168 // Build environment variables.
169- const env : NodeJS . ProcessEnv = {
170- ...process . env ,
171- }
169+ const coanaEnv : NodeJS . ProcessEnv = { }
172170 // do not pass default repo and branch name to coana to avoid mixing
173171 // buckets (cached configuration) from projects that are likely very different.
174172 if ( repoName && repoName !== constants . SOCKET_DEFAULT_REPOSITORY ) {
175- env [ 'SOCKET_REPO_NAME' ] = repoName
173+ coanaEnv [ 'SOCKET_REPO_NAME' ] = repoName
176174 }
177175 if ( branchName && branchName !== constants . SOCKET_DEFAULT_BRANCH ) {
178- env [ 'SOCKET_BRANCH_NAME' ] = branchName
176+ coanaEnv [ 'SOCKET_BRANCH_NAME' ] = branchName
179177 }
180178
181179 // Run Coana with the manifests tar hash.
182180 const coanaResult = await spawnCoana ( coanaArgs , orgSlug , {
183181 cwd,
184- env,
182+ env : coanaEnv ,
185183 spinner,
186184 stdio : 'inherit' ,
187185 } )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export async function spawnCoana(
3535 __proto__ : null ,
3636 ...options ,
3737 } as ShadowBinOptions
38- const mixinsEnv : Record < string , string > = {
38+ const mixinsEnv : NodeJS . ProcessEnv = {
3939 SOCKET_CLI_VERSION : constants . ENV . INLINED_SOCKET_CLI_VERSION ,
4040 }
4141 const defaultApiToken = getDefaultApiToken ( )
@@ -63,6 +63,8 @@ export async function spawnCoana(
6363 {
6464 ...spawnOpts ,
6565 env : {
66+ ...process . env ,
67+ ...constants . processEnv ,
6668 ...mixinsEnv ,
6769 ...spawnEnv ,
6870 } ,
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export function cmdit(
7676export async function invokeNpm (
7777 entryPath : string ,
7878 args : string [ ] ,
79- env = { } ,
79+ spawnEnv = { } ,
8080) : Promise < {
8181 code : number
8282 error ?: {
@@ -93,7 +93,7 @@ export async function invokeNpm(
9393 env : {
9494 ...process . env ,
9595 ...constants . processEnv ,
96- ...env ,
96+ ...spawnEnv ,
9797 } ,
9898 } )
9999 return {
You can’t perform that action at this time.
0 commit comments