File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,30 @@ export async function scanReachability(cwd: string): Promise<CResult<unknown>> {
1111 const result = await spawn (
1212 constants . execPath ,
1313 [
14+ // Lazily access constants.nodeNoWarningsFlags.
15+ ...constants . nodeNoWarningsFlags ,
1416 // Lazily access constants.coanaBinPath.
1517 constants . coanaBinPath ,
1618 'run' ,
1719 cwd ,
18- '--disable-report-submission' ,
1920 '--output-dir' ,
2021 cwd ,
22+ '--disable-report-submission' ,
2123 '--socket-mode' ,
22- `./ ${ DOT_SOCKET_DOT_FACTS_JSON } ` ,
24+ DOT_SOCKET_DOT_FACTS_JSON ,
2325 ] ,
24- { cwd } ,
26+ {
27+ cwd,
28+ env : {
29+ ...process . env ,
30+ // Lazily access constants.ENV.SOCKET_CLI_API_TOKEN
31+ SOCKET_CLI_API_TOKEN : constants . ENV . SOCKET_CLI_API_TOKEN
32+ }
33+ } ,
2534 )
2635 return { ok : true , data : result . stdout . trim ( ) }
2736 } catch ( e ) {
28- return { ok : false , data : e , message : ( e as Error ) ?. message }
37+ const message = ( e as any ) ?. stdout ?? ( e as Error ) ?. message
38+ return { ok : false , data : e , message }
2939 }
3040}
You can’t perform that action at this time.
0 commit comments