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

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

Closed
smorimoto opened this issue Jun 15, 2021 · 2 comments · Fixed by #4715
Closed

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

smorimoto opened this issue Jun 15, 2021 · 2 comments · Fixed by #4715
Milestone

Comments

@smorimoto
Copy link
Member

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")
@dra27 dra27 added this to the 2.1.0 milestone Jun 16, 2021
@dra27
Copy link
Member

dra27 commented Jun 16, 2021

I can reproduce this from 2.1.0~alpha2 onwards, but not for 2.1.0~alpha - was that the release tag or a subsequent build from the master branch in git?

@dra27
Copy link
Member

dra27 commented Jun 16, 2021

Oh no, I see what happened now!

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

Successfully merging a pull request may close this issue.

3 participants