Skip to content

Commit 34a2843

Browse files
committed
resolve usually better than join
1 parent 2a34770 commit 34a2843

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

bin/cli.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import { join, dirname } from "path";
3+
import { resolve, dirname } from "path";
44
import { spawnPromise } from "spawn-rx";
55
import { fileURLToPath } from "url";
66

@@ -10,10 +10,22 @@ async function main() {
1010
// Get command line arguments
1111
const [, , command, ...mcpServerArgs] = process.argv;
1212

13-
const inspectorServerPath = join(__dirname, "../server/build/index.js");
13+
const inspectorServerPath = resolve(
14+
__dirname,
15+
"..",
16+
"server",
17+
"build",
18+
"index.js",
19+
);
1420

1521
// Path to the client entry point
16-
const inspectorClientPath = join(__dirname, "../client/bin/cli.js");
22+
const inspectorClientPath = resolve(
23+
__dirname,
24+
"..",
25+
"client",
26+
"bin",
27+
"cli.js",
28+
);
1729

1830
const CLIENT_PORT = process.env.CLIENT_PORT ?? "5173";
1931
const SERVER_PORT = process.env.SERVER_PORT ?? "3000";

0 commit comments

Comments
 (0)