Skip to content

Commit c4e0574

Browse files
committed
define __dirname in daemon
1 parent 4c05761 commit c4e0574

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/cli/daemon.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import "dotenv/config";
22
import { enable, logger } from "@libp2p/logger";
33
import { Multiaddr } from "@multiformats/multiaddr";
44
import type { Libp2pOptions } from "libp2p";
5-
import { join, resolve } from "node:path";
5+
import { dirname, join, resolve } from "node:path";
6+
import { fileURLToPath } from "node:url";
67
import { parseArgs } from "node:util";
78
import { SupportedPrivateKey } from "../challenge.js";
89
import { ZZZYNC } from "../constants.js";
@@ -17,6 +18,8 @@ import {
1718
setupConfig,
1819
} from "./utils.js";
1920

21+
const __dirname = dirname(fileURLToPath(import.meta.url));
22+
2023
const DAEMON_NAMESPACE = `${ZZZYNC}:daemon`;
2124
const log = logger(DAEMON_NAMESPACE);
2225

0 commit comments

Comments
 (0)