-
Notifications
You must be signed in to change notification settings - Fork 374
Enforce dry run not changing opam root #6565
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
base: master
Are you sure you want to change the base?
Conversation
I added several tests in the PR, all are fixed. I'm looking for other tests to add, even if they are not fixed in this PR. |
match OpamStateConfig.(!r.dryrun), result with | ||
| true, Result () -> | ||
let base f = OpamFilename.Base.of_string (OpamFilename.Dir.to_string f) in | ||
(match OpamRepositoryBackend.get_diff (OpamFilename.Dir.of_string "/") (base srcdir) (base srcdir0) with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temporary hack, get_diff needs to change arguments and take absolute path, or have 2 functions.
let srcdir = OpamPath.Switch.pinned_package root st.switch nv.name in | ||
let srcdir = | ||
if OpamStateConfig.(!r.dryrun) then | ||
OpamFilename.mk_tmp_dir () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't check if all these temp dir created are well cleaned
### sh pre.sh | ||
### OPAMVERBOSE=2 OPAMDEBUG=-5 opam switch remove dr --dry-run | ||
### sh post.sh | ||
### :2a: local switch creation : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then numbers doesn't make sense, to update at finalisation
No description provided.