Skip to content

Commit 2c4ce84

Browse files
Exception occurs on CLI start if the folder .haulmont/cli/plugins doesn't exist #170
1 parent ac548e1 commit 2c4ce84

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/kotlin/com/haulmont/cuba/cli/PluginLoader.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ internal class PluginLoader {
4747

4848
loadPluginsByDir(pluginsDir, mode)
4949

50-
Files.walk(pluginsDir, 1)
51-
.filter { it != pluginsDir }
52-
.filter { Files.isDirectory(it) }
53-
.forEach { loadPluginsByDir(it, mode) }
50+
if(Files.exists(pluginsDir)) {
51+
Files.walk(pluginsDir, 1)
52+
.filter { it != pluginsDir }
53+
.filter { Files.isDirectory(it) }
54+
.forEach { loadPluginsByDir(it, mode) }
55+
}
5456

5557
log.log(Level.INFO, "InitPluginEvent")
5658
bus.post(InitPluginEvent(commandsRegistry, mode))

0 commit comments

Comments
 (0)