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

Allow overriding an override #987

Closed
visr opened this issue Jul 9, 2024 · 3 comments · Fixed by #1002
Closed

Allow overriding an override #987

visr opened this issue Jul 9, 2024 · 3 comments · Fixed by #1002
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@visr
Copy link
Contributor

visr commented Jul 9, 2024

I just discovered overrides, which work great, though I have one suggestion on setting overrides.

Currently if you set an override on a path that already has an override, you get an error and the override does not change:

❯ juliaup override set 1.10.4

❯ juliaup override set 1.10.4
Error: '\\?\D:\repo\ribasim\Ribasim' path already has an override configured.

This means that the only way to reliably set an override is this, because unset luckily doesn't error if it is already unset:

juliaup override unset
juliaup override set 1.10.4

I feel like if a user asks for a valid override, that should be done, rather than erroring out.

@davidanthoff davidanthoff added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 9, 2024
@mitiemann
Copy link

Also, if you try to juliaup override set [channel] which has not been juliaup add [channel], the confusing error message Error: '[channel]' does not exist. is displayed. It should be possible to search whether '[channel] is available on the channel list and then something like
Error: '[channel]' does not exist locally, but is available remotely. Do you want to add it now [y/n]:
would be a nice feature.

@davidanthoff
Copy link
Collaborator

Both excellent feature suggestions!

@mitiemann
Copy link

I feel like if a user asks for a valid override, that should be done, rather than erroring out.

Although probably you should print a warning. Otherwise an user might accidentally loosen an override, e.g.,

> juliaup override set 1.10.1

> juliaup override set 1.10

and you'd suddenly get 1.10.4 (maybe a bad example, but I think the principle applies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants