fix: replace bash array syntax with POSIX sh compatible code in stage… - #56870
Closed
fisker086 wants to merge 3 commits into
Closed
fix: replace bash array syntax with POSIX sh compatible code in stage…#56870fisker086 wants to merge 3 commits into
fisker086 wants to merge 3 commits into
Conversation
…2-hook.sh The script uses #!/bin/sh but used bash-specific array syntax (()) for _merge_args, causing 'Syntax error: (\" unexpected' on systems where /bin/sh is not bash (e.g. dash). Replace with POSIX-compatible set -- \"\$@\" pattern. Removed redundant directory creation and ownership checks for HERMES_HOME in rootless environments. Updated comments to clarify behavior in rootless scenarios.
Collaborator
Scope mismatch — flagging for a maintainer. The title/description say this only "replaces bash array syntax with POSIX sh compatible code," but the diff to
The rootless-compat intent is reasonable, but as written it would regress ownership handling for the majority of (non-rootless) Docker users and adds private-distro code. Please resubmit isolated to just the POSIX- |
Open
23 tasks
…set -- "$@"` instead of `_merge_args=(...)` when calling sync_nexus_hermes_config.py, since the hook runs under /bin/sh.
fix(docker): use POSIX sh arg passing in stage2-hook.sh
Replace bash-only `_merge_args` array syntax with `set -- "$@"` in
sync_nexus_hermes_config invocation. The script uses `#!/bin/sh` but
bash arrays cause `Syntax error: (" unexpected` on dash-based systems.
Restore upstream Docker bootstrap behavior (HERMES_HOME mkdir, targeted
chown, profiles/cron ownership reset) that was incorrectly removed in a
prior overly broad change.
7 tasks
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.
…2-hook.sh The script uses #!/bin/sh but used bash-specific array syntax (()) for _merge_args, causing 'Syntax error: (" unexpected' on systems where /bin/sh is not bash (e.g. dash). Replace with POSIX-compatible set -- "$@" pattern.
Removed redundant directory creation and ownership checks for HERMES_HOME in rootless environments. Updated comments to clarify behavior in rootless scenarios.
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs