Conversation
Log analysis showed -c was barely used (1 attempt today out of 154 execute calls) and that attempt failed due to pipe/heredoc mangling C# content. Agents naturally converge on Write tool + script execute -f, which has no encoding issues. The skill now explicitly recommends this workflow.
`unityctl script execute MyScript.cs` now works without -f flag. If the first positional arg ends in .cs, it's treated as the file path. The -f option still works for backwards compatibility. Also updates all docs to use the positional form.
Extract ResolvePositionalFile into a testable static method and add 7 unit tests covering file resolution, arg splitting, case insensitivity, explicit -f precedence, and edge cases.
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
-c/--codeinline option fromscript execute, keeping only-f(file) and stdinscript execute -fworkflow, with a warning against shell heredocsscript evalfor one-liners and file-basedscript execute -fwith full C# exampleMotivation
Log analysis of today's fire repo sessions showed:
script executecalls used-c— and it failed (pipe/heredoc mangled the C# content)cat > /tmp/file.cs << 'EOF'heredocs failed 4 out of 62 times due to single quotes in C# breaking the delimiterscript evalhandles one-liners (200 calls today),-fhandles everything else (154 calls)Removing
-celiminates a failure mode and aligns the CLI with how agents actually use it. Stdin piping still works for programmatic use.Test plan
dotnet build— cleandotnet test— 207 passed./uc script execute --helpconfirms-cis gonescript eval+ Write tool +script execute -fwithout issues