Skip to content

Commit

Permalink
Don't confirm pinning invariant packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Feb 27, 2021
1 parent 5b5be7b commit b2c4398
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ New option/command/subcommand are prefixed with ◈.

## Pin
* Don't look for lock files for pin depends [#4511 @rjbou - fix #4505]
* Don't ask for confirmation for pinning base packages (similarly makes no
sense with 2.1 switch invariants) [#4571 @dra27]

## List
*
Expand Down
8 changes: 0 additions & 8 deletions src/client/opamPinCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,6 @@ and source_pin
(* else raise Exns.Aborted *);
cur_version, cur_urlf
with Not_found ->
if OpamPackage.has_name st.compiler_packages name then (
OpamConsole.warning
"Package %s is part of the base packages of this compiler."
(OpamPackage.Name.to_string name);
if not @@ OpamConsole.confirm
"Are you sure you want to override this and pin it anyway?"
then raise Aborted
);
let version = default_version st name in
version, None
in
Expand Down

0 comments on commit b2c4398

Please sign in to comment.