Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions qmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as sqliteVec from "sqlite-vec";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import { realpathSync } from "fs";

const HOME = Bun.env.HOME || "/tmp";

Expand Down Expand Up @@ -116,10 +117,7 @@ function getPwd(): string {
// Get canonical realpath, falling back to resolved path if file doesn't exist
function getRealPath(path: string): string {
try {
const result = Bun.spawnSync(["realpath", path]);
if (result.success) {
return result.stdout.toString().trim();
}
return realpathSync(path).toString();
} catch {}
return resolve(path);
}
Expand Down