Skip to content

Commit

Permalink
Display a warning when opam switch --all is used without list-available
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Aug 8, 2024
1 parent 7c9273f commit 90046e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client/opamCommands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2819,6 +2819,9 @@ let switch cli =
if d_no_autoinstall then
OpamConsole.warning "Option %s is deprecated, ignoring it."
(OpamConsole.colorise `bold "--no-autoinstall");
if all && command <> Some `list_available then
OpamConsole.warning "Option %s is not used"
(OpamConsole.colorise `bold "--all");
apply_global_options cli global_options;
apply_build_options cli build_options;
let invariant_arg ?repos rt args =
Expand Down

0 comments on commit 90046e3

Please sign in to comment.