[jrubyscripting] Filter files that are added to the watch list (#14590)

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
jimtng 2023-03-22 08:18:46 +10:00 committed by GitHub
parent 31454ac0a1
commit 72254b820d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,7 @@ public class JRubyScriptFileWatcher extends AbstractScriptFileWatcher {
if (scriptEngineFactory.isFileInGemHome(path) || scriptEngineFactory.isFileInLoadPath(path)) {
return Optional.empty();
}
return super.getScriptType(scriptFilePath);
return super.getScriptType(scriptFilePath).filter(type -> scriptEngineFactory.getScriptTypes().contains(type));
}
}