Skip to content

Commit

Permalink
Running cedar's rake doesn't override the system's envs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffh committed Feb 3, 2014
1 parent 7c80d86 commit b2e3483
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Rakefile
Expand Up @@ -67,10 +67,12 @@ def with_env_vars(env_vars)
ENV[key] = new_value
end

yield

env_vars.each_key do |key|
ENV[key] = old_values[key]
begin
yield
ensure
env_vars.each_key do |key|
ENV[key] = old_values[key]
end
end
end

Expand Down

0 comments on commit b2e3483

Please sign in to comment.