Skip to content
3 changes: 2 additions & 1 deletion src/copilot-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "copilot-cli",
"version": "1.0.0",
"version": "1.1.2",
"name": "GitHub Copilot CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/copilot-cli",
"description": "Installs the GitHub Copilot CLI.",
Expand All @@ -15,6 +15,7 @@
"description": "Select version of the GitHub Copilot CLI, if not latest."
}
},
"postStartCommand": "[ -f /etc/devcontainer-copilot-cli/auto-update ] && copilot update || true",
"customizations": {
"vscode": {
"settings": {
Expand Down
6 changes: 6 additions & 0 deletions src/copilot-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@ echo "Downloading GitHub Copilot CLI..."

install_using_github

# Create a flag file if using "latest" or "prerelease" so the postStartCommand knows to auto-update
if [ "${CLI_VERSION}" = "latest" ] || [ "${CLI_VERSION}" = "prerelease" ]; then
mkdir -p /etc/devcontainer-copilot-cli
touch /etc/devcontainer-copilot-cli/auto-update
fi

Loading