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 opam lock command exits with a non-zero exit code when dependencies are not yet installed in the current switch #6341

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
all done and rebased/squashed,
the text below is the texts of last commits that have been cleaned up and squashed.

 sorry 1st commit was a mistake

Update src/client/opamLockCommand.ml based on suggestions of

@kit-ty-kate

Co-authored-by: Kate <[email protected]>

i commited last time  from ipad and sorry for the mistale

my error msg needs correction

all done

all done, this time really
progressive-galib committed Dec 20, 2024
commit a658c6840c4f6cbf3693dd58e813932505fb9323
13 changes: 7 additions & 6 deletions src/client/opamLockCommand.ml
Original file line number Diff line number Diff line change
@@ -96,12 +96,13 @@ let select_packages atom_locs st =
atoms
in
if missing <> [] then
(OpamConsole.error_and_exit
"Skipping %s, dependencies are not satisfied in this switch, \
not installed packages are:\n%s"
(OpamPackage.to_string nv)
(OpamStd.Format.itemize OpamFormula.string_of_atom missing);
acc)
(OpamConsole.error_and_exit `Not_found
"Operation aborted:
Dependencies for %s required in the current switch are not met. \
\nPlease ensure the following packages are installed:\n%s"
(OpamPackage.to_string nv)
(OpamStd.Format.itemize OpamFormula.string_of_atom missing);
acc)
else
OpamPackage.Set.add nv acc)
names OpamPackage.Set.empty