Skip to content

feat(chezmoi): add opencode binary for linux, fix template whitespace#782

Merged
yxtay merged 4 commits into
mainfrom
feat/add-opencode-linux
May 25, 2026
Merged

feat(chezmoi): add opencode binary for linux, fix template whitespace#782
yxtay merged 4 commits into
mainfrom
feat/add-opencode-linux

Conversation

@yxtay
Copy link
Copy Markdown
Owner

@yxtay yxtay commented May 25, 2026

Summary

  • Add opencode archive-file entry in .chezmoiexternal.toml.tmpl for Linux (x86_64/arm64)
  • Fix template delimiters across chezmoi scripts for consistent whitespace handling ({{- if }} / {{- end }} pattern)

Test plan

  • Verify chezmoi apply on Linux downloads opencode binary to ~/.local/bin/opencode
  • Verify scripts render without extra blank lines on both macOS and Linux

🤖 Generated with Claude Code

Add opencode archive-file entry in .chezmoiexternal for Linux.
Fix template delimiters across scripts for consistent whitespace handling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the opencode binary for Linux and modifies whitespace handling in several shell script templates. However, several critical issues were identified: adding blank lines before the shebang (#!) in templates will prevent the kernel from correctly identifying the script interpreter, and the use of leading whitespace stripping ({{-) in the antigravity script will cause URL concatenation, breaking the bash array. Additionally, it is recommended to use normalized .os and .arch variables for the opencode download URL to ensure compatibility with the release asset naming convention.

Comment thread chezmoi/.chezmoiscripts/run_after_update_agent_skills.sh.tmpl
Comment thread chezmoi/.chezmoiscripts/run_before_brew_install.sh.tmpl
Comment thread chezmoi/.chezmoiexternal.toml.tmpl Outdated
Comment thread chezmoi/.chezmoiscripts/run_onchange_setup_antigravity.sh.tmpl
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.25s
✅ ACTION zizmor 5 0 0 0 1.55s
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.26s
✅ BASH shfmt 3 0 0 0 0.02s
✅ COPYPASTE jscpd yes no no 0.82s
✅ EDITORCONFIG editorconfig-checker 58 0 0 0.07s
✅ JSON prettier 1 0 0 0 0.35s
✅ JSON v8r 1 0 0 2.22s
✅ LUA luacheck 1 0 0 0.11s
✅ LUA stylua 1 0 0 0.02s
✅ MARKDOWN markdownlint 4 0 0 0 0.76s
✅ MARKDOWN markdown-table-formatter 4 0 0 0 0.18s
✅ REPOSITORY checkov yes no no 30.73s
✅ REPOSITORY devskim yes no no 1.77s
✅ REPOSITORY dustilock yes no no 0.02s
✅ REPOSITORY gitleaks yes no no 1.28s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 58.56s
✅ REPOSITORY kingfisher yes no no 7.59s
⚠️ REPOSITORY osv-scanner yes 1 no 0.21s
✅ REPOSITORY secretlint yes no no 1.94s
⚠️ REPOSITORY semgrep yes no 1 29.81s
✅ REPOSITORY syft yes no no 2.44s
✅ REPOSITORY trivy yes no no 9.66s
✅ REPOSITORY trivy-sbom yes no no 0.16s
✅ REPOSITORY trufflehog yes no no 6.48s
✅ SPELL lychee 17 0 0 1.24s
✅ YAML prettier 10 0 0 0 0.61s
✅ YAML v8r 10 0 0 9.63s
✅ YAML yamllint 10 0 0 0.43s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 40 dirs visited, 129 inodes visited, 0 Extract calls, 2.513236ms elapsed, 2.513466ms wall time
No package sources found, --help for usage information.
⚠️ REPOSITORY / semgrep - 1 warning

No output available

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,COPYPASTE_JSCPD,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_V8R,JSON_PRETTIER,LUA_LUACHECK,LUA_STYLUA,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SEMGREP,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_KINGFISHER,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@yxtay yxtay merged commit a36cd2b into main May 25, 2026
26 checks passed
@yxtay yxtay deleted the feat/add-opencode-linux branch May 25, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant