Merge pull request #719 from richardkmichael/fix-704-trim-command-whitespace

fix: Trim whitespace from Command input to prevent ENOENT
This commit is contained in:
Ola Hungerford 2025-08-21 18:50:52 -07:00 • committed by GitHub
commit d48164aa09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 550 additions and 512 deletions

View file

@ -268,6 +268,7 @@ const Sidebar = ({
placeholder="Command"
value={command}
onChange={(e) => setCommand(e.target.value)}
onBlur={(e) => setCommand(e.target.value.trim())}
className="font-mono"
/>
</div>

File diff suppressed because it is too large Load diff

View file

@ -181,7 +181,7 @@ const createTransport = async (req: express.Request): Promise<Transport> => {
const transportType = query.transportType as string;
if (transportType === "stdio") {
const command = query.command as string;
const command = (query.command as string).trim();
const origArgs = shellParseArgs(query.args as string) as string[];
const queryEnv = query.env ? JSON.parse(query.env as string) : {};
const env = { ...defaultEnvironment, ...process.env, ...queryEnv };