Skip to content

The layout update should not fail even if the installed-switches are incorrect #4713

Description

@smorimoto

If you run rm -rf _opam insetad of opam switch remove . to delete a local switch, opam cannot update the config properly. If you try to update the layout under these conditions, you will get an error like the following, but it should not occur or it should be more friendly.

~
❯ opam update --upgrade
This version of opam requires an update to the layout of /home/smorimoto/.opam from version 2.1~alpha to version
2.1~rc, which can't be reverted.
You may want to back it up before going further.
Perform the update and continue? [Y/n] y
Fatal error:
Sys_error("/home/smorimoto/src/github.com/REDACTED/REDACTED/_opam/.opam-switch/switch-config: No such file or directory")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions