Skip to content

Commit

Permalink
Merge pull request #4571 from dra27/pinning-base
Browse files Browse the repository at this point in the history
Don't confirm pinning invariant packages
  • Loading branch information
dra27 authored Mar 7, 2021
2 parents 70f74ae + b2c4398 commit 1c9f023
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 @@ -28,6 +28,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 1c9f023

Please sign in to comment.