Update installation commands for GitHub CLI#13126
Conversation
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 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.
Do you have a doc link for this by any chance? |
|
I agree with @BagToad. I can understand why it maybe recommended to use
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. |
|
Sorry for ghosting you @BagToad @babakks ! The reason I wanted to add the source parameter is because Winget is shipped with two sources:
By default the MS Store source requires that the user accepts the The problem starts when the user doesn't have Local Admin access, because accepting the terms needs local admin privileges.
But when the
|
|
@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. |
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 |
This comment was marked as off-topic.
This comment was marked as off-topic.
100% agree. |
|
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. |
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. |
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
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. |
|
Thanks for sharing thoughts @JohnMcPMS and @sassdawe! 🙏 I'm happy with the changes. Ship it! 🛳️ |


Added '--source winget' option to install and upgrade commands.
On machines where the
Storesource is enabled but the license to use the store is not granted specifying the source is required.This does not have any negative effect.