From c14704c46a47418e77d6f1ad76f6c204b15c056b Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Sun, 13 Sep 2026 04:09:27 +0000 Subject: CLI: fix duplicate shebang in bundle; accept flags before the command (--help, -h) esbuild already keeps the shebang from src/cli/main.ts, so the extra banner produced two shebang lines and node refused to load the bundle. Co-Authored-By: Claude Opus 5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index d736062..d187d6a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "dev": "electron-vite dev", "build": "electron-vite build && npx esbuild src/mcp/lattex.mjs --bundle --platform=node --format=esm --outfile=out/mcp/lattex.mjs", - "build:cli": "npx esbuild src/cli/main.ts --bundle --platform=node --format=esm --target=node18 --outfile=out/cli/lattex-cli.mjs --external:ws --banner:js='#!/usr/bin/env node'", + "build:cli": "npx esbuild src/cli/main.ts --bundle --platform=node --format=esm --target=node18 --outfile=out/cli/lattex-cli.mjs --external:ws", "typecheck:cli": "npx tsc --project tsconfig.cli.json --noEmit", "test:cli": "node --experimental-vm-modules out/cli/test.mjs", "preview": "electron-vite preview", -- cgit v1.2.3