diff --git a/master_changes.md b/master_changes.md index bc2c04e23cc..cc2b03f255a 100644 --- a/master_changes.md +++ b/master_changes.md @@ -43,6 +43,7 @@ users) ## Config ## Pin + * Don't ask confirmation when pinning an unknown package (absent from repositories) [#6309 @kit-ty-kate] ## List diff --git a/src/client/opamPinCommand.ml b/src/client/opamPinCommand.ml index 0dfa97051d3..6f76a010a93 100644 --- a/src/client/opamPinCommand.ml +++ b/src/client/opamPinCommand.ml @@ -491,12 +491,9 @@ and source_pin version, None in - if not (OpamPackage.has_name st.packages name) && - not (OpamConsole.confirm - "Package %s does not exist, create as a %s package?" - (OpamPackage.Name.to_string name) - (OpamConsole.colorise `bold "NEW")) - then raise Aborted; + if not (OpamPackage.has_name st.packages name) then + OpamConsole.note "Package %s was unknown until now" + (OpamPackage.Name.to_string name); (match OpamStd.Option.map OpamFile.URL.url cur_urlf, target_url with | Some u, Some target when OpamUrl.(