diff options
Diffstat (limited to 'src/headless')
-rw-r--r-- | src/headless/taler-wallet-cli.ts | 13 |
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); + }); +} |