aboutsummaryrefslogtreecommitdiff
path: root/src/headless
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-14 18:49:56 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-14 18:49:56 +0200
commit94357e226d27d028ca95bde5174aa0ed49041187 (patch)
tree3d0136c82e264e3fe255ab1d08608972a9896143 /src/headless
parent11acb0c4035e38f8ffe0d26b845bfa50e777f4b3 (diff)
downloadwallet-core-94357e226d27d028ca95bde5174aa0ed49041187.tar.xz
index for node package
Diffstat (limited to 'src/headless')
-rw-r--r--src/headless/taler-wallet-cli.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts
index 435210fcc..0c6c2ba98 100644
--- a/src/headless/taler-wallet-cli.ts
+++ b/src/headless/taler-wallet-cli.ts
@@ -231,7 +231,7 @@ class MerchantBackendConnection {
}
}
-async function main() {
+export async function main() {
const myNotifier = new ConsoleNotifier();
const myBadge = new ConsoleBadge();
@@ -349,7 +349,10 @@ async function main() {
myWallet.stop();
}
-main().catch(err => {
- console.error("Failed with exception:");
- console.error(err);
-});
+
+if (require.main === module) {
+ main().catch(err => {
+ console.error("Failed with exception:");
+ console.error(err);
+ });
+}