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);
9
9
async function snykTest ( cwd ) {
10
10
const tmpPath = path . join ( os . tmpdir ( ) , 'tempfile-' + Date . now ( ) ) ;
11
11
12
+ let execErr ;
13
+
12
14
try {
13
15
console . info ( `testing ${ cwd } ...` ) ;
14
16
await fs . mkdir ( path . join ( cwd , `node_modules` ) , { recursive : true } ) ;
@@ -24,17 +26,19 @@ async function snykTest(cwd) {
24
26
'--dev' ,
25
27
`--json-file-output=${ tmpPath } ` ,
26
28
] ,
27
- { cwd, stdio : 'inherit' }
29
+ { cwd }
28
30
) ;
29
31
} catch ( err ) {
30
- console . warn ( err ) ;
32
+ execErr = err ;
31
33
}
32
34
33
35
const res = JSON . parse ( await fs . readFile ( tmpPath ) ) ;
34
36
console . info ( `testing ${ cwd } done.` ) ;
35
37
return res ;
36
38
} catch ( err ) {
37
- console . error ( `testing ${ cwd } failed. ${ err . message } ` ) ;
39
+ console . error (
40
+ `testing ${ cwd } failed. ${ err . message } . Exec error: ${ execErr } `
41
+ ) ;
38
42
} finally {
39
43
try {
40
44
await fs . rm ( tmpPath ) ;
You can’t perform that action at this time.
0 commit comments