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(
166
166
]
167
167
168
168
// Build environment variables.
169
- const env : NodeJS . ProcessEnv = {
170
- ...process . env ,
171
- }
169
+ const coanaEnv : NodeJS . ProcessEnv = { }
172
170
// do not pass default repo and branch name to coana to avoid mixing
173
171
// buckets (cached configuration) from projects that are likely very different.
174
172
if ( repoName && repoName !== constants . SOCKET_DEFAULT_REPOSITORY ) {
175
- env [ 'SOCKET_REPO_NAME' ] = repoName
173
+ coanaEnv [ 'SOCKET_REPO_NAME' ] = repoName
176
174
}
177
175
if ( branchName && branchName !== constants . SOCKET_DEFAULT_BRANCH ) {
178
- env [ 'SOCKET_BRANCH_NAME' ] = branchName
176
+ coanaEnv [ 'SOCKET_BRANCH_NAME' ] = branchName
179
177
}
180
178
181
179
// Run Coana with the manifests tar hash.
182
180
const coanaResult = await spawnCoana ( coanaArgs , orgSlug , {
183
181
cwd,
184
- env,
182
+ env : coanaEnv ,
185
183
spinner,
186
184
stdio : 'inherit' ,
187
185
} )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export async function spawnCoana(
35
35
__proto__ : null ,
36
36
...options ,
37
37
} as ShadowBinOptions
38
- const mixinsEnv : Record < string , string > = {
38
+ const mixinsEnv : NodeJS . ProcessEnv = {
39
39
SOCKET_CLI_VERSION : constants . ENV . INLINED_SOCKET_CLI_VERSION ,
40
40
}
41
41
const defaultApiToken = getDefaultApiToken ( )
@@ -63,6 +63,8 @@ export async function spawnCoana(
63
63
{
64
64
...spawnOpts ,
65
65
env : {
66
+ ...process . env ,
67
+ ...constants . processEnv ,
66
68
...mixinsEnv ,
67
69
...spawnEnv ,
68
70
} ,
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export function cmdit(
76
76
export async function invokeNpm (
77
77
entryPath : string ,
78
78
args : string [ ] ,
79
- env = { } ,
79
+ spawnEnv = { } ,
80
80
) : Promise < {
81
81
code : number
82
82
error ?: {
@@ -93,7 +93,7 @@ export async function invokeNpm(
93
93
env : {
94
94
...process . env ,
95
95
...constants . processEnv ,
96
- ...env ,
96
+ ...spawnEnv ,
97
97
} ,
98
98
} )
99
99
return {
You can’t perform that action at this time.
0 commit comments