Skip to content

Update installation commands for GitHub CLI#13126

Merged
babakks merged 1 commit into
cli:trunkfrom
sassdawe:patch-1
May 12, 2026
Merged

Update installation commands for GitHub CLI#13126
babakks merged 1 commit into
cli:trunkfrom
sassdawe:patch-1

Conversation

@sassdawe

@sassdawe sassdawe commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Added '--source winget' option to install and upgrade commands.

On machines where the Store source is enabled but the license to use the store is not granted specifying the source is required.

This does not have any negative effect.

Added '--source winget' option to install and upgrade commands.

On machines where the `Store` source is enabled but the license to use the store is not granted specifying the source is required. 

This does not have any negative effect.
@sassdawe sassdawe requested a review from a team as a code owner April 9, 2026 11:04
@sassdawe sassdawe requested review from babakks and Copilot April 9, 2026 11:04
@github-actions github-actions Bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels Apr 9, 2026

This comment was marked as off-topic.

@BagToad

BagToad commented May 4, 2026

Copy link
Copy Markdown
Member

@sassdawe do you have any information or docs or links more about why this is required? I don't think I fully understand the problem we're fixing.

On machines where the Store source is enabled but the license to use the store is not granted specifying the source is required.

Do you have a doc link for this by any chance?

@babakks babakks added the more-info-needed More info needed from user/contributor label May 11, 2026
@babakks

babakks commented May 11, 2026

Copy link
Copy Markdown
Member

I agree with @BagToad. I can understand why it maybe recommended to use --source, but as I'm checking WinGet's entry for gh it doesn't include the --source option:

image

So, I'm closing this, but @sassdawe, please feel free to comment and provide us with any references/docs supporting this change, and then we'll discuss this again.

@babakks babakks closed this May 11, 2026
@sassdawe

Copy link
Copy Markdown
Contributor Author

Sorry for ghosting you @BagToad @babakks !

The reason I wanted to add the source parameter is because Winget is shipped with two sources:

  • winget
  • msstore

By default the MS Store source requires that the user accepts the Terms of Transactions, without this not even searching can execute.

The problem starts when the user doesn't have Local Admin access, because accepting the terms needs local admin privileges.

for the sake of the demonstration I did not accept the terms because I don't have a VM and an account without admin rights to get you the normal error message.

But when the --source winget parameter is appended both searching and installing works.

image

@JohnMcPMS

Copy link
Copy Markdown

@sassdawe (I'm a winget maintainer) I agree with the overall goal of specifying the source as it prevents any potential confusion/conflict about the identity of the target package. It also has the benefit of bypassing the source level agreement for the MS Store as you point out.

Can you help with the admin statement though? It shouldn't require admin to accept via any code paths, nor should it require it to store that acceptance. There might be some code path that we then execute that only works if the user is in the administrator group, but I wouldn't expect it to require that the current token is.

@sassdawe

Copy link
Copy Markdown
Contributor Author

It shouldn't require admin to accept via any code paths, nor should it require it to store that acceptance.

You are right! I haven't realized that the permission requirements have been changed and now without admin rights we can accept the ToT. (I just tested it with a standard local account)

I still think that having the docs contain the --source winget addition doesn't do any harm and in some cases it can prevent confusion when someone is using Winget for the first time and never accepted the MS Store terms before.

@BagToad BagToad reopened this May 12, 2026
@github-actions github-actions Bot added ready-for-review and removed needs-triage needs to be reviewed labels May 12, 2026
@github-actions

This comment was marked as off-topic.

@BagToad BagToad removed more-info-needed More info needed from user/contributor ready-for-review labels May 12, 2026
@github-actions github-actions Bot added the needs-triage needs to be reviewed label May 12, 2026
@JohnMcPMS

Copy link
Copy Markdown

I still think that having the docs contain the --source winget addition doesn't do any harm and in some cases it can prevent confusion when someone is using Winget for the first time and never accepted the MS Store terms before.

100% agree.

@BagToad BagToad removed the needs-triage needs to be reviewed label May 12, 2026
@BagToad

BagToad commented May 12, 2026

Copy link
Copy Markdown
Member

Thank you @sassdawe @JohnMcPMS for the help 🙏

My gut feel is that this seems like something that winget could improve to avoid needing that flag, but I think I'm convinced enough that it doesn't hurt to have this - if it helps people avoid friction that seems like a good enough reason to add it.

It just feels weird thinking about what @babakks mentioned how WinGet's entry for gh does not include it but we're going to include it - both instructions should be the same since it's installing the same app IMO.

Anyone know if there are there other projects doing this? Might be useful to see if we're not the only one with this friction and if they're simply updating their installation steps too.

P.S. @babakks please let me know what you think too given the above new info.

@sassdawe

Copy link
Copy Markdown
Contributor Author

Anyone know if there are there other projects doing this?

Most of the machines I have access to have the MS Store source disabled by policy, and I only ran into this on a new VM where I wanted to use GitHub Copilot CLI for a quick test.

I think in general the assumption is that people will just accept whatever the system asked them to accept - which have been annoying Enterprise admin for well over a decade now - I believe, because at bigger shoppes the store and other similar things have to be blocked by policies, firewalls, etc.

@JohnMcPMS

Copy link
Copy Markdown

My gut feel is that this seems like something that winget could improve to avoid needing that flag, but I think I'm convinced enough that it doesn't hurt to have this - if it helps people avoid friction that seems like a good enough reason to add it.

Winget provides a convenience mechanism on the command line to provide a string to be more search engine like. If you want to specify an explicit package identity, we need both the source and the package identifier. The --source (or -s) parameter is the only way to do that portion currently.

It just feels weird thinking about what @babakks mentioned how WinGet's entry for gh does not include it but we're going to include it - both instructions should be the same since it's installing the same app IMO.

winget.run is a 3rd party website. I'm not sure if @denelon already has a relationship with them or would like to suggest that they add the source parameter.

@BagToad BagToad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good to me, but I'd like @babakks to review too before merging. Thanks folks 🙌

@babakks

babakks commented May 12, 2026

Copy link
Copy Markdown
Member

Thanks for sharing thoughts @JohnMcPMS and @sassdawe! 🙏

I'm happy with the changes. Ship it! 🛳️

@babakks babakks merged commit 2733bfb into cli:trunk May 12, 2026
41 of 45 checks passed
@sassdawe sassdawe deleted the patch-1 branch May 12, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants