Skip to content

Conditionally run copilot update in postStartCommand only for latest version#3

Merged
cmbrose merged 1 commit intomainfrom
copilot/update-poststartcommand-auto-install
Apr 20, 2026
Merged

Conditionally run copilot update in postStartCommand only for latest version#3
cmbrose merged 1 commit intomainfrom
copilot/update-poststartcommand-auto-install

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 20, 2026

The postStartCommand unconditionally runs copilot update on every container start, even when a specific version was pinned. Since the version option isn't available at postStartCommand time, a flag file bridges the gap.

Changes

  • install.sh: Creates /etc/devcontainer-copilot-cli/use-latest flag file when VERSION is latest
  • devcontainer-feature.json: postStartCommand now checks for the flag before running update:
    [ -f /etc/devcontainer-copilot-cli/use-latest ] && copilot update || true
    

@cmbrose cmbrose marked this pull request as ready for review April 20, 2026 19:09
@cmbrose cmbrose merged commit b9d8ef3 into main Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants