Skip to content

fix: install correct version in action#19591

Closed
harrisoncramer wants to merge 4 commits intogithub:mainfrom
harrisoncramer:main
Closed

fix: install correct version in action#19591
harrisoncramer wants to merge 4 commits intogithub:mainfrom
harrisoncramer:main

Conversation

@harrisoncramer
Copy link

The install.sh script was using gh extension install github/gh-aw --force which always installs the latest version, completely ignoring the specified version input.

Changes Made

File: actions/setup-cli/install.sh:241-248

  1. Added version pinning logic: When a version is specified (and it's not "latest"), the script now uses the --pin flag to install the specific version:
    INSTALL_CMD="gh extension install \"$REPO\" --force --pin \"$VERSION\""

Testing

All tests pass (6/6), including the new test that specifically validates version pinning functionality.

Copilot AI review requested due to automatic review settings March 4, 2026 12:25
Comment on lines +85 to +86
# Test 5: Verify version pinning support
test_version_pinning() {
Copy link
Author

Choose a reason for hiding this comment

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

This functionality seems to be an old test that was never cleaned up.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the setup action’s gh extension install path so that specifying a version actually installs that version (instead of always installing the latest).

Changes:

  • Add --pin <version> when a non-latest version is requested for gh extension install.
  • Update the action output to report the detected installed version from gh aw version.
  • Replace the prior validation test with a new test that checks for version pinning support.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
actions/setup-cli/install.sh Adds version-pinning logic for gh extension install and adjusts the reported installed_version.
actions/setup-cli/install_test.sh Updates tests to check for --pin usage in the installer script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan
Copy link
Contributor

pelikhan commented Mar 4, 2026

@copilot review install updates

Copilot AI added a commit that referenced this pull request Mar 4, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request Mar 4, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Contributor

pelikhan commented Mar 4, 2026

Merged in other PR

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.

3 participants