From 34a2843756b8441794d86ff85df3d003ea4dc01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=AFs=20Betts?= Date: Tue, 26 Nov 2024 17:11:32 +0100 Subject: [PATCH] resolve usually better than join --- bin/cli.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 5bd438e..ced2099 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { join, dirname } from "path"; +import { resolve, dirname } from "path"; import { spawnPromise } from "spawn-rx"; import { fileURLToPath } from "url"; @@ -10,10 +10,22 @@ async function main() { // Get command line arguments const [, , command, ...mcpServerArgs] = process.argv; - const inspectorServerPath = join(__dirname, "../server/build/index.js"); + const inspectorServerPath = resolve( + __dirname, + "..", + "server", + "build", + "index.js", + ); // Path to the client entry point - const inspectorClientPath = join(__dirname, "../client/bin/cli.js"); + const inspectorClientPath = resolve( + __dirname, + "..", + "client", + "bin", + "cli.js", + ); const CLIENT_PORT = process.env.CLIENT_PORT ?? "5173"; const SERVER_PORT = process.env.SERVER_PORT ?? "3000";