Skip to content

Commit

Permalink
opam clean: Ignore errors trying to remove directories (ocaml#3732)
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate authored and rjbou committed Mar 28, 2019
1 parent 4e6c8d5 commit f8bff70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/client/opamCommands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2930,14 +2930,16 @@ let clean =
OpamConsole.msg "rm -rf \"%s\"/*\n"
(OpamFilename.Dir.to_string d)
else
OpamFilename.cleandir d
try OpamFilename.cleandir d
with OpamSystem.Internal_error msg -> OpamConsole.warning "Error ignored: %s" msg
in
let rmdir d =
if dry_run then
OpamConsole.msg "rm -rf \"%s\"\n"
(OpamFilename.Dir.to_string d)
else
OpamFilename.rmdir d
try OpamFilename.rmdir d
with OpamSystem.Internal_error msg -> OpamConsole.warning "Error ignored: %s" msg
in
let switches =
if all_switches then OpamGlobalState.switches gt
Expand Down

0 comments on commit f8bff70

Please sign in to comment.