Commit a1759666 authored by Alexis Reigel's avatar Alexis Reigel

reset original directory in ensure

parent 2c17853a
...@@ -68,17 +68,13 @@ module Gitlab ...@@ -68,17 +68,13 @@ module Gitlab
private private
def optimistic_using_tmp_keychain def optimistic_using_tmp_keychain
previous_dir = current_home_dir
Dir.mktmpdir do |dir| Dir.mktmpdir do |dir|
previous_dir = current_home_dir
GPGME::Engine.home_dir = dir GPGME::Engine.home_dir = dir
yield
return_value = yield
GPGME::Engine.home_dir = previous_dir
return_value
end end
ensure
GPGME::Engine.home_dir = previous_dir
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment