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 5252import com .semmle .util .exception .UserError ;
5353import com .semmle .util .extraction .ExtractorOutputConfig ;
5454import com .semmle .util .files .FileUtil ;
55+ import com .semmle .util .files .FileUtil8 ;
5556import com .semmle .util .io .WholeIO ;
5657import com .semmle .util .io .csv .CSVReader ;
5758import com .semmle .util .language .LegacyLanguage ;
@@ -438,8 +439,10 @@ public int run() throws IOException {
438439 startThreadPool ();
439440 try {
440441 extractSource ();
441- extractExterns ();
442442 extractXml ();
443+ if (seenCode ) { // don't bother with the externs if no code was seen
444+ extractExterns ();
445+ }
443446 } finally {
444447 shutdownThreadPool ();
445448 }
@@ -449,7 +452,9 @@ public int run() throws IOException {
449452 } else {
450453 warn ("No JavaScript or TypeScript code found." );
451454 }
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 ;
453458 }
454459 return 0 ;
455460 }
You can’t perform that action at this time.
0 commit comments