fix(desktop): handle quoted paths with spaces in extension commands#6430
Merged
DOsinga merged 3 commits intoblock:mainfrom Jan 29, 2026
Merged
fix(desktop): handle quoted paths with spaces in extension commands#6430DOsinga merged 3 commits intoblock:mainfrom
DOsinga merged 3 commits intoblock:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where extension commands with quoted paths containing spaces were not parsed correctly. The fix replaces simple string splitting with the shell-quote library to properly handle shell quoting.
Changes:
- Updated
splitCmdAndArgsto useshell-quote.parse()for proper shell-style parsing of commands - Updated
combineCmdAndArgsto useshell-quote.quote()to properly escape arguments - Added
shell-quoteand@types/shell-quotedependencies
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ui/desktop/src/components/settings/extensions/utils.ts | Replaces naive string splitting with shell-quote library for proper handling of quoted paths with spaces |
| ui/desktop/package.json | Adds shell-quote runtime dependency and type definitions |
| ui/desktop/package-lock.json | Locks shell-quote dependencies and adjusts peer dependency markers |
Files not reviewed (1)
- ui/desktop/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
ui/desktop/src/components/settings/extensions/utils.ts:186
- Tests should be added to verify the fix for the actual bug - handling quoted paths with spaces (e.g., 'python "/path/with spaces/script.py"' should split into cmd='python' and args=['/path/with spaces/script.py'], and vice versa for combineCmdAndArgs).
export function splitCmdAndArgs(str: string): { cmd: string; args: string[] } {
const trimmed = str.trim();
if (!trimmed) {
return { cmd: '', args: [] };
}
const parsed = parseShellQuote(trimmed);
const words = parsed.filter((item): item is string => typeof item === 'string').map(String);
const cmd = words[0] || '';
const args = words.slice(1);
return {
cmd,
args,
};
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
5bf9859 to
f23e6ef
Compare
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
DOsinga
approved these changes
Jan 29, 2026
zanesq
added a commit
that referenced
this pull request
Jan 29, 2026
* 'main' of github.com:block/goose: (62 commits) Swap canonical model from openrouter to models.dev (#6625) Hook thinking status (#6815) Fetch new skills hourly (#6814) copilot instructions: Update "No prerelease docs" instruction (#6795) refactor: centralize audience filtering before providers receive messages (#6728) update doc to remind contributors to activate hermit and document minimal npm and node version (#6727) nit: don't spit out compaction when in term mode as it fills up the screen (#6799) fix: correct tool support detection in Tetrate provider model fetching (#6808) Session manager fixes (#6809) fix(desktop): handle quoted paths with spaces in extension commands (#6430) fix: we can default gooseignore without writing it out (#6802) fix broken link (#6810) docs: add Beads MCP extension tutorial (#6792) feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable (#6739) [docs] Add OSS Skills Marketplace (#6752) feat: make skills available in codemode (#6763) Fix: Recipe Extensions Not Loading in Desktop (#6777) Different approach to determining final confidence level of prompt injection evaluation outcomes (#6729) fix: read_resource_tool deadlock causing test_compaction to hang (#6737) Upgrade error handling (#6747) ...
zanesq
added a commit
that referenced
this pull request
Jan 29, 2026
…sion-session * 'main' of github.com:block/goose: (78 commits) copilot instructions: Update "No prerelease docs" instruction (#6795) refactor: centralize audience filtering before providers receive messages (#6728) update doc to remind contributors to activate hermit and document minimal npm and node version (#6727) nit: don't spit out compaction when in term mode as it fills up the screen (#6799) fix: correct tool support detection in Tetrate provider model fetching (#6808) Session manager fixes (#6809) fix(desktop): handle quoted paths with spaces in extension commands (#6430) fix: we can default gooseignore without writing it out (#6802) fix broken link (#6810) docs: add Beads MCP extension tutorial (#6792) feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable (#6739) [docs] Add OSS Skills Marketplace (#6752) feat: make skills available in codemode (#6763) Fix: Recipe Extensions Not Loading in Desktop (#6777) Different approach to determining final confidence level of prompt injection evaluation outcomes (#6729) fix: read_resource_tool deadlock causing test_compaction to hang (#6737) Upgrade error handling (#6747) Fix/filter audience 6703 local (#6773) chore: re-sync package-lock.json (#6783) upgrade electron to 39.3.0 (#6779) ...
lifeizhou-ap
added a commit
that referenced
this pull request
Jan 29, 2026
* main: docs: usage data collection (#6822) feat: platform extension migrator + code mode rename (#6611) feat: CLI flag to skip loading profile extensions (#6780) Swap canonical model from openrouter to models.dev (#6625) Hook thinking status (#6815) Fetch new skills hourly (#6814) copilot instructions: Update "No prerelease docs" instruction (#6795) refactor: centralize audience filtering before providers receive messages (#6728) update doc to remind contributors to activate hermit and document minimal npm and node version (#6727) nit: don't spit out compaction when in term mode as it fills up the screen (#6799) fix: correct tool support detection in Tetrate provider model fetching (#6808) Session manager fixes (#6809) fix(desktop): handle quoted paths with spaces in extension commands (#6430) fix: we can default gooseignore without writing it out (#6802) fix broken link (#6810) docs: add Beads MCP extension tutorial (#6792) feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable (#6739)
Tyler-Hardin
pushed a commit
to Tyler-Hardin/goose
that referenced
this pull request
Feb 11, 2026
…lock#6430) Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Tyler-Hardin
pushed a commit
to Tyler-Hardin/goose
that referenced
this pull request
Feb 11, 2026
…lock#6430) Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #6417
PR Description
This PR fixes a bug where extension commands with quoted paths containing spaces were not parsed correctly. The fix replaces simple string splitting with the shell-quote library to properly handle shell quoting.
Type of Change
AI Assistance
Testing
Screenshots/Demos (for UX changes)
Before:
After: