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

Unable to install ambiguous package #812

Closed
vladdeSV opened this issue Oct 16, 2023 · 5 comments
Closed

Unable to install ambiguous package #812

vladdeSV opened this issue Oct 16, 2023 · 5 comments

Comments

@vladdeSV
Copy link

vladdeSV commented Oct 16, 2023

If I try to pkgx install nvim (neovim.io), I get the error:

$ pkgx install nvim
× multiple projects provide: nvim
│ pls be more specific:
│
│     pkgx +lunarvim.org install nvim
│     pkgx +neovim.io install nvim
│
╰─➤ https://docs.pkgx.sh/help/ambiguous-pkgspec

However, the command pkgx +neovim.io install nvim fails:

$ pkgx +neovim.io install nvim
install: missing destination file operand after 'nvim'
Try '/Users/vladde/.pkgx/gnu.org/coreutils/v9.4.0/bin/install --help' for more information.

My guess is that install isn't interpreted as the built-in command, and is using that package instead.

EDIT: Using pkgx 1.0.1 on macOS 14.0

@vladdeSV
Copy link
Author

Maybe unrelated to issue, but using x causes odd (but similar) behaviour.

$ nvim
^^ type `x` to run that

$ x
env +nvim && nvim
× multiple projects provide: nvim
│ pls be more specific:
│
│     pkgx +lunarvim.org --internal.use +nvim
│     pkgx +neovim.io --internal.use +nvim
│
╰─➤ https://docs.pkgx.sh/help/ambiguous-pkgspec
/Users/vladde/.local/state/pkgx/shellcode/x.3859:1: command not found: nvim

$ pkgx +neovim.io --internal.use +nvim
× multiple projects provide: nvim
│ pls be more specific:
│
│     pkgx +lunarvim.org +neovim.io --internal.use +nvim
│     pkgx +neovim.io +neovim.io --internal.use +nvim
│
╰─➤ https://docs.pkgx.sh/help/ambiguous-pkgspec

@yoroshikun
Copy link
Contributor

Im assuming the following.
Its simply fuzzy matching.
Both neovim and lunarvim export the nvim command.
So yea you must be more specific.

However the help and install command seems to be broken. and can reproduce.

pkgx +neovim.io install
❯ pkgx +neovim.io install nvim
install: missing destination file operand after 'nvim'
Try '/Users/yoro/.pkgx/gnu.org/coreutils/v9.4.0/bin/install --help' for more information.

@jhheider
Copy link
Contributor

I think these are issues of the help command. The install should be pkgx install neovim.io. The --internal.use one is more interesting. Scanning that code, it's quite clear to me yet what the right fix is, but I'm sure @mxcl will weigh in.

@vladdeSV
Copy link
Author

pkgx install neovim.io was the command I needed!

Leaving it up to you smart people to figure out what is up with the help command 😇

@mxcl
Copy link
Member

mxcl commented Oct 17, 2023

yeah I need to special case the help text for install. Soz.

mxcl added a commit that referenced this issue Oct 17, 2023
@mxcl mxcl closed this as completed in 492f290 Oct 17, 2023
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

No branches or pull requests

4 participants