Skip to content

Commit 4c6b0c6

Browse files
committed
Remove default --config-file
1 parent b0b4548 commit 4c6b0c6

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

json-log-viewer/jvm/src/main/scala/ru/d10xa/jsonlogviewer/decline/ConfigInitImpl.scala

-14
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,9 @@ class ConfigInitImpl extends ConfigInit {
2121
val configFileOpt: Option[Path] =
2222
c.configFile
2323
.map(file => Path(file.file))
24-
.orElse(findDefaultFile())
2524
loadConfigRef(configFileOpt, supervisor)
2625
}
2726

28-
private def findDefaultFile(): Option[Path] =
29-
findConfigFile("json-log-viewer", List("yml", "yaml", "YML", "YAML"))
30-
.map(Path.apply)
31-
3227
private def loadConfigRef(
3328
configFileOpt: Option[Path],
3429
supervisor: Supervisor[IO]
@@ -83,13 +78,4 @@ class ConfigInitImpl extends ConfigInit {
8378
.as(None)
8479
}
8580

86-
private def findConfigFile(
87-
baseName: String,
88-
extensions: List[String]
89-
): Option[String] =
90-
extensions.collectFirst {
91-
case ext if new File(s"$baseName.$ext").exists() =>
92-
s"$baseName.$ext"
93-
}
94-
9581
}

0 commit comments

Comments
 (0)