Skip to content

Commit 208b46d

Browse files
committed
add leniency for tests
1 parent f2cebd9 commit 208b46d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/java/org/elasticsearch/plugins/PluginsService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ static class Bundle {
276276
// similar in impl to getPluginBundles, but DO NOT try to make them share code.
277277
// we don't need to inherit all the leniency, and things are different enough.
278278
static List<Bundle> getModuleBundles(Path modulesDirectory) throws IOException {
279+
// damn leniency
280+
if (Files.notExists(modulesDirectory)) {
281+
return Collections.emptyList();
282+
}
279283
List<Bundle> bundles = new ArrayList<>();
280284
try (DirectoryStream<Path> stream = Files.newDirectoryStream(modulesDirectory)) {
281285
for (Path module : stream) {

0 commit comments

Comments
 (0)