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

Do not error when adding an already installed channel. #716

Merged

Conversation

GunnarFarneback
Copy link
Contributor

Make it benign to add a channel that was already installed.

Before PR:

julia> run(`juliaup add 1.6.7`)
Error: '1.6.7' is already installed.
ERROR: failed process: Process(`juliaup add 1.6.7`, ProcessExited(1)) [1]

After PR:

julia> run(`juliaup add 1.6.7`)
'1.6.7' is already installed.
Process(`target/debug/juliaup add 1.6.7`, ProcessExited(0))

Fixes #573.

Disclaimer: I have never written a single line of Rust, so anything in this small PR could potentially be wrong.

Copy link

@albheim albheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is not an error to add an already added channel it probably is not an error to remove a channel that is not added in src/command_remove.rs either.

I think I agree that error is a bit strong for this, and it should just be information.

@davidanthoff davidanthoff merged commit 8beb581 into JuliaLang:main Nov 15, 2023
23 checks passed
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.

juliaup add should not return exit code 1 if ver exists
3 participants