Fix three command failures in Claude Code sandbox#11
Merged
Conversation
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
init: The original flow ranpre-commit installbeforegit commit --amend, so the amend fired the newly installed hooks (which tried to install sqlfluff via pip and failed withSSLCertVerificationErrorin the sandbox). Fix: movepre-commit autoupdateto before the initial commit so the updated config is included in that commit, then runpre-commit installonly after all commits are done. The initial commit has no hooks installed; the amend is eliminated entirely. Also clearGIT_DIR/GIT_INDEX_FILEenv vars inherited from a parent worktree, which caused git subprocesses during tests to operate on the wrong repo.update: Pre-check~/.cargo/writability before invoking cargo. Replaces raw "Operation not permitted (os error 1)" with a single actionable message pointing the user outside the sandbox.execute --interactive: Detect no-TTY viastd::io::IsTerminal. When--interactiveis requested without a terminal: use the parameter's declared default value if one exists; otherwise bail with an explicit--param name=<value>hint instead of crashing withIO error: not a terminal.Verification
498bc5d— Reorder init to eliminate git commit --amend and clear git env varsBefore:
After:
458ac1a— Detect ~/.cargo/ write restriction in update commandBefore:
After:
34257a7— Fall back to defaults in execute --interactive when no TTYBefore (any parameterized query):
After (param has no default):
After (param has a default):