Skip to content

opam switch remove should offer to clean up a stale directory #5827

@dra27

Description

@dra27

Somewhat related to #1636 and friends.

The messages from opam here are confusing:

C:\Devel\opam-repository5>opam switch create ocaml-5.1.1-compressed ocaml-variants.5.1.1+options
[ERROR] Directory "C:\\Users\\DRA\\AppData\\Local\\opam\\ocaml-5.1.1-compressed" already exists, please choose a different name

C:\Devel\opam-repository5>opam switch remove ocaml-5.1.1-compressed
The compiler switch ocaml-5.1.1-compressed does not exist.

The cause is a leftover directory from an aborted switch. It would be nice if we changed opam switch remove to at least offer to remove the directory; it would be really nice if opam switch create offered similarly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions