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

opam repo add: silence warning when --this-switch is explicitly passed #4889

Closed
emillon opened this issue Nov 5, 2021 · 0 comments · Fixed by #4899
Closed

opam repo add: silence warning when --this-switch is explicitly passed #4889

emillon opened this issue Nov 5, 2021 · 0 comments · Fixed by #4899
Labels
Projects
Milestone

Comments

@emillon
Copy link
Contributor

emillon commented Nov 5, 2021

Hi,

When using opam repo add NAME URL, the following message gets printed:

Repository NAME has been added to the selections of switch SWITCH only.
Run `opam repository add NAME --all-switches|--set-default' to use it in all existing switches, or in newly created switches, respectively.

I would expect that explicitly passing --this-switch (equivalent to the default behavior) would silence this warning, but that is not the case. There does not seem to be a way to silence it.

What do you think about printing the warning only if this behavior is selected by default?

For context, the mirage 4 client is generating this in build scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Opam 2.2.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants