File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,16 @@ public void run() throws IOException {
374374 */
375375 private void extractExterns () throws IOException {
376376 ExtractorConfig config = new ExtractorConfig (false ).withExterns (true );
377+
378+ // use explicitly specified trap cache, or otherwise $SEMMLE_DIST/.cache/trap-cache/javascript,
379+ // which we pre-populate when building the distribution
380+ ITrapCache trapCache = this .trapCache ;
381+ if (trapCache instanceof DummyTrapCache ) {
382+ Path trapCachePath = SEMMLE_DIST .resolve (".cache" ).resolve ("trap-cache" ).resolve ("javascript" );
383+ if (Files .isDirectory (trapCachePath ))
384+ trapCache = new DefaultTrapCache (trapCachePath .toString (), null , Main .EXTRACTOR_VERSION );
385+ }
386+
377387 FileExtractor extractor = new FileExtractor (config , outputConfig , trapCache , extractorState );
378388 FileVisitor <? super Path > visitor = new SimpleFileVisitor <Path >() {
379389 @ Override
You can’t perform that action at this time.
0 commit comments