-
Notifications
You must be signed in to change notification settings - Fork 1
feat(claude-code): add yoloAlias option #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
08059ca
feat(claude-code): add yoloAlias option for skip-permissions shortcut
tmaier f7f18e5
fix(claude-code): address PR review feedback for yoloAlias
tmaier 0527e9e
fix(claude-code): guard fish function overwrite and narrow chown scope
tmaier cc08fcd
fix(claude-code): precise docs wording and add remoteUser test scenario
tmaier ced9e5b
fix(claude-code): handle missing trailing newline and fix directory o…
tmaier fc8c781
chore(claude-code): bump version to 2.2.0
tmaier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
|
|
||
| # This test file will be executed against the 'claude_code_yolo_alias' scenario | ||
| # to verify that the yolo alias is properly configured. | ||
|
|
||
| set -e | ||
|
|
||
| # Import test library bundled with the devcontainer CLI | ||
| source dev-container-features-test-lib | ||
|
|
||
| # Feature-specific tests | ||
| check "claude command available" which claude | ||
| check "yolo alias in bashrc" bash -c "grep -Fq 'claude --allow-dangerously-skip-permissions' ~/.bashrc" | ||
| check "yolo alias in zshrc" bash -c "grep -Fq 'claude --allow-dangerously-skip-permissions' ~/.zshrc" | ||
| check "fish yolo function body" bash -c "test -f ~/.config/fish/functions/yolo.fish && grep -Fq 'claude --allow-dangerously-skip-permissions' ~/.config/fish/functions/yolo.fish" | ||
| check "yolo resolves in bash" bash -ic "type yolo" | ||
|
|
||
| # Report results | ||
| reportResults |
23 changes: 23 additions & 0 deletions
23
test/claude-code/claude_code_yolo_alias_with_custom_user.sh
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
|
|
||
| # This test file will be executed against the 'claude_code_yolo_alias_with_custom_user' scenario | ||
| # to verify that the yolo alias is properly configured for a non-root remoteUser. | ||
|
|
||
| set -e | ||
|
|
||
| # Import test library bundled with the devcontainer CLI | ||
| source dev-container-features-test-lib | ||
|
|
||
| # Feature-specific tests | ||
| check "claude command available" which claude | ||
| check "yolo alias in bashrc" bash -c "grep -Fq 'claude --allow-dangerously-skip-permissions' ~/.bashrc" | ||
| check "yolo alias in zshrc" bash -c "grep -Fq 'claude --allow-dangerously-skip-permissions' ~/.zshrc" | ||
| check "fish yolo function body" bash -c "test -f ~/.config/fish/functions/yolo.fish && grep -Fq 'claude --allow-dangerously-skip-permissions' ~/.config/fish/functions/yolo.fish" | ||
| check "bashrc owned by current user" bash -c "test \"$(stat -c '%U' ~/.bashrc)\" = \"$(whoami)\"" | ||
| check "zshrc owned by current user" bash -c "test \"$(stat -c '%U' ~/.zshrc)\" = \"$(whoami)\"" | ||
|
|
||
| check "fish functions dir owned by current user" bash -c "test \"$(stat -c '%U' ~/.config/fish/functions)\" = \"$(whoami)\"" | ||
| check "fish function owned by current user" bash -c "test \"$(stat -c '%U' ~/.config/fish/functions/yolo.fish)\" = \"$(whoami)\"" | ||
| check "yolo resolves in bash" bash -ic "type yolo" | ||
|
|
||
| # Report results | ||
| reportResults | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.