File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -541,10 +541,24 @@ let init cli =
541541 ~additional_installs: default_compiler)
542542 with e ->
543543 OpamStd.Exn. finalise e @@ fun () ->
544+ let invariant_str = match invariant with
545+ | OpamFormula. Atom (name , Empty) ->
546+ OpamPackage.Name. to_string name
547+ | OpamFormula. Atom (name , Atom (op , v )) ->
548+ " '" ^
549+ OpamPackage.Name. to_string name ^
550+ OpamFormula. string_of_relop op ^
551+ OpamPackage.Version. to_string v ^
552+ " '"
553+ | formula ->
554+ " --formula '" ^ OpamFormula. to_string formula ^ " '"
555+ in
544556 OpamConsole. note
545557 " Opam has been initialised, but the initial switch creation \
546558 failed.\n \
547- Use 'opam switch create <compiler>' to get started."
559+ Use %s to get started."
560+ (OpamConsole. colorise `bold
561+ (" opam switch create default " ^ invariant_str))
548562 in
549563 OpamSwitchState. drop st
550564 in
You can’t perform that action at this time.
0 commit comments