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

fix: ya pack --upgrade not being able to upgrade existing packages #1060

Closed
wants to merge 1 commit into from

Conversation

mikavilpas
Copy link
Contributor

With the following packages, running the ya pack --upgrade command results in a prompt for a username:

❯ cat ~/dotfiles/.config/yazi/package.toml
[plugin]
deps = [{ use = "DreamMaoMao/keyjump.yazi", commit = "06383de" }, { use = "Rolv-Apneseth/starship.yazi", commit = "6197e4c" }]

[flavor]
deps = []
❯ ya pack --upgrade

  Upgrading package `keyjump.yazi.yazi`

Cloning into '/Users/mikavilpas/.local/state/yazi/packages/109b2bd4c6591dcb62b40b25202be168'...
Username for 'https://github.com':

The problem seems to be that the plugin DreamMaoMao/keyjump.yazi is being resolved to https://github.com/DreamMaoMao/keyjump.yazi.yazi with an extra .yazi at the end.

We discussed this behaviour (and decided it's preferred to add .yazi when adding new packages) in

...but I did not realize at the time that it also affects upgrading packages.

With the following packages, running the `ya pack --upgrade` command
results in a prompt for a username:

```sh
❯ cat ~/dotfiles/.config/yazi/package.toml
[plugin]
deps = [{ use = "DreamMaoMao/keyjump.yazi", commit = "06383de" }, { use = "Rolv-Apneseth/starship.yazi", commit = "6197e4c" }]

[flavor]
deps = []
❯ ya pack --upgrade

  Upgrading package `keyjump.yazi.yazi`

Cloning into '/Users/mikavilpas/.local/state/yazi/packages/109b2bd4c6591dcb62b40b25202be168'...
Username for 'https://github.com':
```

The problem seems to be that the plugin `DreamMaoMao/keyjump.yazi` is
being resolved to `https://github.com/DreamMaoMao/keyjump.yazi.yazi`
with an extra `.yazi` at the end.

We discussed this behaviour (and decided it's preferred to add `.yazi`
when adding new packages) in

- sxyazi#1019
- sxyazi#1023

...but I did not realize at the time that it also affects upgrading
packages.
@sxyazi
Copy link
Owner

sxyazi commented May 20, 2024

Hi, no .yazi should be added anywhere in the package manager domain. Because use is not strictly a repository name/URL; it could also refer to a sub-package within a repository, such as yazi-rs/flavors#catppuccin-mocha. This is also ultimately why I decided to change from repo to use. Closing as it's expected behavior.

@sxyazi sxyazi closed this May 20, 2024
@mikavilpas
Copy link
Contributor Author

Oh, I see. It must have been the case that my configuration is actually wrong!

In that case I agree, this should be closed as expected.

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.

None yet

2 participants