File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ const execFile = promisify(childProcess.execFile);
99async function snykTest ( cwd ) {
1010 const tmpPath = path . join ( os . tmpdir ( ) , 'tempfile-' + Date . now ( ) ) ;
1111
12+ let execErr ;
13+
1214 try {
1315 console . info ( `testing ${ cwd } ...` ) ;
1416 await fs . mkdir ( path . join ( cwd , `node_modules` ) , { recursive : true } ) ;
@@ -24,17 +26,19 @@ async function snykTest(cwd) {
2426 '--dev' ,
2527 `--json-file-output=${ tmpPath } ` ,
2628 ] ,
27- { cwd, stdio : 'inherit' }
29+ { cwd }
2830 ) ;
2931 } catch ( err ) {
30- console . warn ( err ) ;
32+ execErr = err ;
3133 }
3234
3335 const res = JSON . parse ( await fs . readFile ( tmpPath ) ) ;
3436 console . info ( `testing ${ cwd } done.` ) ;
3537 return res ;
3638 } catch ( err ) {
37- console . error ( `testing ${ cwd } failed. ${ err . message } ` ) ;
39+ console . error (
40+ `testing ${ cwd } failed. ${ err . message } . Exec error: ${ execErr } `
41+ ) ;
3842 } finally {
3943 try {
4044 await fs . rm ( tmpPath ) ;
You can’t perform that action at this time.
0 commit comments