Skip to content

Commit

Permalink
Make opam show --list-files <pkg> fail when <pkg> is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Dec 10, 2021
1 parent 0c53542 commit 0f2f9ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/opamListCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,10 @@ let detail_printer ?prettify ?normalise ?(sort=false) st nv =
OpamPath.Switch.changes st.switch_global.root st.switch nv.name
in
(match OpamFile.Changes.read_opt changes_f with
| None -> ""
| None ->
OpamConsole.error_and_exit `Not_found
"Cannot list installed files: %s is not installed"
(OpamPackage.Name.to_string nv.name)
| Some c ->
OpamStd.Format.itemize ~bullet:""
(fun (file, status) ->
Expand Down

0 comments on commit 0f2f9ae

Please sign in to comment.