diff options
Diffstat (limited to 'packages/taler-wallet-cli/src/assets.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/assets.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-wallet-cli/src/assets.ts b/packages/taler-wallet-cli/src/assets.ts index 72fc9fe04..8e9306780 100644 --- a/packages/taler-wallet-cli/src/assets.ts +++ b/packages/taler-wallet-cli/src/assets.ts @@ -20,6 +20,8 @@ import path from "path"; import fs from "fs"; +const assetFileUrl = import.meta.url; + /** * Resolve an asset name into an absolute filename. * @@ -27,8 +29,8 @@ import fs from "fs"; * at the top level of the package (i.e. next to package.json). */ export function resolveAsset(name: string): string { - const n = __filename; - const d = __dirname; + const n = path.basename(assetFileUrl); + const d = path.dirname(assetFileUrl); let assetPath: string; // Currently both asset paths are the same. // This might change if the file that contains "resolveAsset" |