summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/src/main/kotlin/Cli.kt14
-rwxr-xr-xcontrib/libeufin-dbconfig2
2 files changed, 8 insertions, 8 deletions
diff --git a/common/src/main/kotlin/Cli.kt b/common/src/main/kotlin/Cli.kt
index b11f9ded..4c231e74 100644
--- a/common/src/main/kotlin/Cli.kt
+++ b/common/src/main/kotlin/Cli.kt
@@ -1,6 +1,6 @@
/*
* This file is part of LibEuFin.
- * Copyright (C) 2023 Taler Systems S.A.
+ * Copyright (C) 2023-2024 Taler Systems S.A.
* LibEuFin is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -81,22 +81,22 @@ private class CliConfigGet(private val configSource: ConfigSource) : CliktComman
"--filename", "-f",
help = "Interpret value as path with dollar-expansion"
).flag()
- private val sectionName by argument()
- private val optionName by argument()
+ private val section by argument()
+ private val option by argument()
override fun run() = cliCmd(logger, common.log) {
val config = configSource.fromFile(common.config)
if (isPath) {
- val res = config.lookupPath(sectionName, optionName)
+ val res = config.lookupPath(section, option)
if (res == null) {
- throw Exception("value not found in config")
+ throw Exception("option '$option' in section '$section' not found in config")
}
println(res)
} else {
- val res = config.lookupString(sectionName, optionName)
+ val res = config.lookupString(section, option)
if (res == null) {
- throw Exception("value not found in config")
+ throw Exception("option '$option' in section '$section' not found in config")
}
println(res)
}
diff --git a/contrib/libeufin-dbconfig b/contrib/libeufin-dbconfig
index 80e258d5..22cf7bd1 100755
--- a/contrib/libeufin-dbconfig
+++ b/contrib/libeufin-dbconfig
@@ -106,7 +106,7 @@ fi
# When using this dbconfig script, the libeufin-bank and libeufin-nexus
# databases *must* match.
-NEXUS_DBPATH=$(libeufin-nexus config get nexus-postgres CONFIG)
+NEXUS_DBPATH=$(libeufin-nexus config get nexus-postgres CONFIG | libeufin-nexus config get libeufin-nexusdb-postgres CONFIG)
if ! echo "$NEXUS_DBPATH" | grep "postgres://" >/dev/null; then
echo "Invalid libeufin-nexus database configuration value '$NEXUS_DBPATH'." 1>&2