File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 52
52
import com .semmle .util .exception .UserError ;
53
53
import com .semmle .util .extraction .ExtractorOutputConfig ;
54
54
import com .semmle .util .files .FileUtil ;
55
+ import com .semmle .util .files .FileUtil8 ;
55
56
import com .semmle .util .io .WholeIO ;
56
57
import com .semmle .util .io .csv .CSVReader ;
57
58
import com .semmle .util .language .LegacyLanguage ;
@@ -438,8 +439,10 @@ public int run() throws IOException {
438
439
startThreadPool ();
439
440
try {
440
441
extractSource ();
441
- extractExterns ();
442
442
extractXml ();
443
+ if (seenCode ) { // don't bother with the externs if no code was seen
444
+ extractExterns ();
445
+ }
443
446
} finally {
444
447
shutdownThreadPool ();
445
448
}
@@ -449,7 +452,9 @@ public int run() throws IOException {
449
452
} else {
450
453
warn ("No JavaScript or TypeScript code found." );
451
454
}
452
- return -1 ;
455
+ // ensuring that the finalize steps detects that no code was seen
456
+ FileUtil8 .recursiveDelete (Paths .get (EnvironmentVariables .getWipDatabase () + "/src" ));
457
+ return 0 ;
453
458
}
454
459
return 0 ;
455
460
}
You can’t perform that action at this time.
0 commit comments