Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report the bucket name installing from #2121

Closed
rasa opened this issue Mar 14, 2018 · 3 comments · Fixed by #5077
Closed

Report the bucket name installing from #2121

rasa opened this issue Mar 14, 2018 · 3 comments · Fixed by #5077

Comments

@rasa
Copy link
Member

rasa commented Mar 14, 2018

If you have a package that's available in two different buckets, scoop doesn't tell you which bucket it's installing an app from. For now, it should tell you the bucket's name, but eventually, perhaps it asks you which one you want?

@rasa rasa self-assigned this Mar 14, 2018
@brandon93s
Copy link
Member

brandon93s commented Mar 14, 2018

Why does the same app exist in multiple buckets, and how does it currently decide which one to install? It could be handled with a prefix, though:

bucket/package@version

In this case, maybe it should error out with a message to choose a bucket instead of choosing one for the user.

@rasa
Copy link
Member Author

rasa commented Mar 14, 2018

@brandon93s: To answer your questions:

  1. Both jmcarbo and I created a removedrive app (here and here).

  2. Scoop probably picks the first bucket alphabetically, but I'd have to check the code to be sure.

  3. Agreed. If there are multiple matches, perhaps we ask the user to select one (or abort if they add a --batch option):

> scoop install removedrive
A removedrive package was found in multiple buckets:
1. jmcarbo/removedrive (2.8.0) (32bit & 64bit)
2. rasa/removedrive (2.8.7) (64bit only)
Enter the number of the bucket you want, or press Q to quit: [1-2]? 

If the user wants scoop to abort instead, s/he can pass the --batch option:

> scoop install --batch removedrive
ERROR: removedrive was not installed, as it was found in multiple buckets:
1. jmcarbo/rremovedrive (2.8.0) (32bit & 64bit)
2. rasa/removedrive (2.8.7) (64bit only)
To install from a specific bucket, prefix the package name with 'bucket/':
> scoop install bucket/removedrive

@rasa rasa changed the title scoop install to report bucket installing from Report the bucket name installing from Mar 14, 2018
@rasa rasa removed their assignment Nov 11, 2021
@rashil2000
Copy link
Member

rashil2000 commented Jul 30, 2022

@rasa

Scoop probably picks the first bucket alphabetically

This is correct. The Get-Manifest function picks it.

However, all of Scoop's user-facing commands, and some internal functions too, rely on this alphabetical-first behaviour, so either stopping the function on ambiguity, or pausing for user input, will break all those commands.

The only safe thing to do now is just print the bucket name (which happens to be alphabetically first) that is currently being installed from. I can make a PR for this, it's a one line change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants