Fix local: version: readonly variable error in feature install scripts - #212
Merged
Merged
Conversation
…sion Agent-Logs-Url: https://github.com/devcontainer-community/devcontainer-features/sessions/65ae43a7-a980-4ad2-85ff-00c9bdc5b206 Co-authored-by: sebst <592313+sebst@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix readonly variable error during installation
Fix Mar 26, 2026
local: version: readonly variable error in feature install scripts
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.
Inside
install(),readonly version="${VERSION:?}"creates a global readonly variable. Whengithub_get_tag_for_version()is subsequently called, itslocal version="$2"declaration fails — bash won't shadow a global readonly with a local.Changes
install.shfiles — renameversion→_versioningithub_get_tag_for_version():astral.sh-uv,atuin.sh,bat,biomejs.dev,btop,charmbracelet-gum,chezmoi.io,delta,fd,icholy-ttygif,jj-vcs.dev,k9scli.io,neovim.io,opencode.ai,pi.dev,pulumi.com,rclone.org,restic.net,ripgrep,schpet-linear-cli,smallstep.com,starship.rs,swc.rs,yq,zellij.dev,zyedidia-egetdevcontainer-feature.jsonfiles — patch version bumpsREADME.md— version table updated to matchOriginal prompt
./install.sh: line xyz: local: version: readonly variableduring installation #211💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.