Lightweight coding agent that runs in your terminal
Rust
fix: path resolution bug in npx (#7134)
Michael Bolinee191dbe8106
diff --git a/shell-tool-mcp/src/index.ts b/shell-tool-mcp/src/index.tsindex 2ce58462f4..9199a5a276 100644--- a/shell-tool-mcp/src/index.ts+++ b/shell-tool-mcp/src/index.ts@@ -8,14 +8,9 @@ import { resolveBashPath } from "./bashSelection";import { readOsRelease } from "./osRelease";import { resolveTargetTriple } from "./platform";-const scriptPath = process.argv[1]- ? path.resolve(process.argv[1])- : process.cwd();-const __dirname = path.dirname(scriptPath);-async function main(): Promise<void> {const targetTriple = resolveTargetTriple(process.platform, process.arch);- const vendorRoot = path.join(__dirname, "..", "vendor");+ const vendorRoot = path.resolve(__dirname, "..", "vendor");const targetRoot = path.join(vendorRoot, targetTriple);const execveWrapperPath = path.join(targetRoot, "codex-execve-wrapper");const serverPath = path.join(targetRoot, "codex-exec-mcp-server");