refactor rename to application.yaml

This commit is contained in:
boxi committed 2026-04-03 22:11:01 +02:00
1 parent 807d466b31
commit debe6c92c8
2 files changed
+4 -7

No files matched your search

@@ -43,8 +43,8 @@ fun loadConfig(): ConfigResult {
// External files take precedence (production use)
val externalLocations = listOf(
File(System.getProperty("user.home"), ".anytask/anytask.yaml"),
File("anytask.yaml"),
File(System.getProperty("user.home"), ".anytask/application.yaml"),
File("application.yaml"),
)
externalLocations.firstOrNull { it.exists() }?.let { file ->
val config = yaml.decodeFromString(serializer, file.readText())
@@ -53,7 +53,7 @@ fun loadConfig(): ConfigResult {
}
// Fallback: classpath resource (development)
Configuration::class.java.getResourceAsStream("/anytask.yaml")?.let { stream ->
Configuration::class.java.getResourceAsStream("/application.yaml")?.let { stream ->
val config = yaml.decodeFromString(serializer, stream.bufferedReader().readText())
logger.info("Loaded config from classpath:/anytask.yaml")
return ConfigResult(config, null)
@@ -64,7 +64,7 @@ fun loadConfig(): ConfigResult {
}
fun saveConfig(config: Configuration, sourceFile: File?) {
val file = sourceFile ?: File(System.getProperty("user.home"), ".anytask/anytask.yaml")
val file = sourceFile ?: File(System.getProperty("user.home"), ".anytask/application.yaml")
file.parentFile?.mkdirs()
val yaml = Yaml.default
file.writeText(yaml.encodeToString(Configuration.serializer(), config))
-3
View File
@@ -1,3 +0,0 @@
connection:
apiKey: 2tkMSzFegWwzsQ+n9SpGwVjychEkCESWjV1/ftytXG4=
spaceId: bafyreiafzvfsrurvx4gvr2wwysgp5uugujzmbdg5hxnjlahfmx3ww6kxfy.172mmtcppmjtt
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.