Skip to content

Confused by opam remote remove when remote does not exist #5012

@emillon

Description

@emillon

Hi,

Here's a shell session that confused me a bit:

 % opam remote
[...]
<><> Repository configuration for switch 4.13.1 <><><><><><><><><><><><><><><><>
 1 another-repo  git+https://github.com/...
 2 default       git+https://github.com/ocaml/opam-repository

 % opam remote remove 1
Repositories removed from the selections of switch 4.13.1. Use '--all' to forget about them altogether.

 % opam remote         
[...]
<><> Repository configuration for switch 4.13.1 <><><><><><><><><><><><><><><><>
 1 another-repo  git+https://github.com/...
 2 default       git+https://github.com/ocaml/opam-repository

 % opam remote remove another-repo
Repositories removed from the selections of switch 4.13.1. Use '--all' to forget about them altogether.

 % opam remote                     
[...]
<><> Repository configuration for switch 4.13.1 <><><><><><><><><><><><><><><><>
 1 default git+https://github.com/ocaml/opam-repository

The confusing part is that I tried to use the number instead of the remote name, but opam remote removed silently did nothing. I think that it should error out or at least warn that it did nothing (I also confused the priority with an id, that part is more on me).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions