aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-08-28 19:40:26 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-08-28 19:40:26 +0200
commitdd4b96e1e62f20c9881d532e40531df8c932a379 (patch)
tree73cd00cc257cecf6b6a9b7396b9599c4e8ea82f8
parentfe7b4c8c0c808ae0b2a9b34e38a1ee9f8d27eae5 (diff)
parent8941f29cb457f86235b73f125e77a88cb762f353 (diff)
Merge branch 'master' into age-withdraw
-rw-r--r--packages/taler-harness/src/index.ts2
-rw-r--r--packages/taler-util/src/talerconfig.ts8
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts
index 841e17dc7..0efaea9ad 100644
--- a/packages/taler-harness/src/index.ts
+++ b/packages/taler-harness/src/index.ts
@@ -196,7 +196,7 @@ configCli
res = config.getPath(args.get.section, args.get.option);
}
if (res.isDefined()) {
- console.log(res.value);
+ console.log(res.getValue());
} else {
console.warn("not found");
process.exit(1);
diff --git a/packages/taler-util/src/talerconfig.ts b/packages/taler-util/src/talerconfig.ts
index 098f5f9a4..e9eb71279 100644
--- a/packages/taler-util/src/talerconfig.ts
+++ b/packages/taler-util/src/talerconfig.ts
@@ -82,7 +82,7 @@ export class ConfigValue<T> {
private optionName: string,
private value: string | undefined,
private converter: (x: string) => T,
- ) {}
+ ) { }
required(): T {
if (this.value == undefined) {
@@ -112,6 +112,10 @@ export class ConfigValue<T> {
isDefined(): boolean {
return this.value !== undefined;
}
+
+ getValue(): string | undefined {
+ return this.value
+ }
}
/**
@@ -245,7 +249,7 @@ function globMatch(pattern: string, str: string): boolean {
/* Backtrack position in pattern */
let patBt = -1;
- for (;;) {
+ for (; ;) {
if (pattern[patPos] === "*") {
strBt = strPos;
patBt = patPos++;