Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix bad match error when cover data file not exists.

  • Loading branch information...
commit 8c51cc85f1a2e550367f86910e1fc98dc0cff688 1 parent 850fbff
Minsu Choi authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/meck.erl
View
6 src/meck.erl
@@ -676,8 +676,10 @@ restore_original(Mod, {File, Data, Options}, WasSticky) ->
cover:compile_beam(File)
end,
restick_original(Mod, WasSticky),
- ok = cover:import(Data),
- ok = file:delete(Data),
+ case cover:import(Data) of
+ ok ->
+ ok = file:delete(Data)
+ end,
ok.
unstick_original(Module) -> unstick_original(Module, code:is_sticky(Module)).

1 comment on commit 8c51cc8

@eproxus

Hmm, this will still fail with a case-clause error. Can you give me anymore hints on how to reproduce the error?

Please sign in to comment.
Something went wrong with that request. Please try again.