diff --git a/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigDiagnostic.java b/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigDiagnostic.java index 574ae74cf169e..d073ca201d7f9 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigDiagnostic.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigDiagnostic.java @@ -6,6 +6,7 @@ import java.net.URI; import java.nio.file.DirectoryStream; import java.nio.file.Files; +import java.nio.file.NotDirectoryException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Collections; @@ -186,6 +187,9 @@ public static Set configFiles(Path configFilesLocation) throws IOExcepti for (Path candidate : candidates) { configFiles.add(candidate.toUri().toURL().toString()); } + } catch (NotDirectoryException ignored) { + log.debugf("File %s is not a directory", configFilesLocation.toAbsolutePath()); + return Collections.emptySet(); } return configFiles; }