fix(core): accept string commands in workspace hook config#781
Merged
fix(core): accept string commands in workspace hook config#781
Conversation
Workspace hooks silently ignored string commands (e.g., `command: node scripts/setup.mjs`) because parseWorkspaceScriptConfig only accepted arrays. Now auto-splits string commands on whitespace to match user expectations. Closes #778 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
a3d2781
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c8aabe3a.agentv.pages.dev |
| Branch Preview URL: | https://fix-778-string-command.agentv.pages.dev |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract parseCommandArray to handle string/array normalization upfront, keeping parseWorkspaceScriptConfig as a single linear flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
Summary
commandnow accepts a string (e.g.,command: node scripts/setup.mjs) by auto-splitting on whitespaceparseWorkspaceScriptConfigreturnedundefinedwith no warningTest plan
should accept string command and auto-split on whitespaceRed/Green UAT
Test YAML — suite defines a default hook with array syntax; one test case tries to override it with string syntax:
Reproduction command (from repo root):
RED (on
main) — override silently falls back to suite defaultThe string command is silently ignored, so
custom-overrideinherits the suite-level default. The user thinks their custom hook ran, but it didn't.GREEN (on
fix/778-string-command) — override works correctlyCloses #778
🤖 Generated with Claude Code