Summary
The "Executing:" message in claude-launcher.ts:33 does not properly show escaped arguments, making it misleading when paths or arguments contain spaces or special characters.
Current State
The current implementation uses simple join with space to display the command:
console.log(`Executing: ${claudePath} ${args.join(" ")}`);
This does not reflect the actual shell escaping that is used during execution (line 40):
const command = `exec ${quote([claudePath, ...args])}`;
Problem
The display shows an unescaped command that may not be valid shell syntax, while the actual execution uses shell-quote for proper escaping.
Example:
- Display shows:
Executing: /path/to/claude --mcp-config /path with spaces/config.json
- Actual execution:
/path/to/claude --mcp-config '/path with spaces/config.json'
If a user tries to copy-paste the displayed command, it would fail because the arguments are not properly quoted.
Proposed Solution
Use the same quote function from shell-quote for the display to ensure consistency:
import { quote } from "shell-quote";
const displayCommand = quote([claudePath, ...args]);
console.log(`Executing: ${displayCommand}`);
Benefits
- Accurate representation of what is actually being executed
- Copy-pastable commands that work correctly
- Consistency between display and execution logic
- Better debugging experience for users
Files to Modify
src/claude-launcher.ts:33 - Update the console.log statement to use quote()
Notes
The quote function is already imported at line 2, so this is a simple one-line change.
Summary
The "Executing:" message in
claude-launcher.ts:33does not properly show escaped arguments, making it misleading when paths or arguments contain spaces or special characters.Current State
The current implementation uses simple join with space to display the command:
This does not reflect the actual shell escaping that is used during execution (line 40):
Problem
The display shows an unescaped command that may not be valid shell syntax, while the actual execution uses shell-quote for proper escaping.
Example:
Executing: /path/to/claude --mcp-config /path with spaces/config.json/path/to/claude --mcp-config '/path with spaces/config.json'If a user tries to copy-paste the displayed command, it would fail because the arguments are not properly quoted.
Proposed Solution
Use the same quote function from shell-quote for the display to ensure consistency:
Benefits
Files to Modify
src/claude-launcher.ts:33- Update the console.log statement to use quote()Notes
The quote function is already imported at line 2, so this is a simple one-line change.