Skip to content

Commit 63bdee5

Browse files
committed
Don't ask confirmation when pinning a new package
1 parent 3a11680 commit 63bdee5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

master_changes.md

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ users)
4343
## Config
4444

4545
## Pin
46+
* Don't ask confirmation when pinning an unknown package (absent from repositories) [#6309 @kit-ty-kate]
4647

4748
## List
4849

src/client/opamPinCommand.ml

+3-6
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,9 @@ and source_pin
491491
version, None
492492
in
493493

494-
if not (OpamPackage.has_name st.packages name) &&
495-
not (OpamConsole.confirm
496-
"Package %s does not exist, create as a %s package?"
497-
(OpamPackage.Name.to_string name)
498-
(OpamConsole.colorise `bold "NEW"))
499-
then raise Aborted;
494+
if not (OpamPackage.has_name st.packages name) then
495+
OpamConsole.note "Package %s was unknown until now"
496+
(OpamPackage.Name.to_string name);
500497

501498
(match OpamStd.Option.map OpamFile.URL.url cur_urlf, target_url with
502499
| Some u, Some target when OpamUrl.(

0 commit comments

Comments
 (0)