Skip to content

Commit

Permalink
Merge pull request #2754 from bastelfreak/rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper authored Sep 6, 2024
2 parents 4e912d8 + 530ed4d commit eda1bdf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/facter/custom_facts/core/execution/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def with_env(values)
# set the new (temporary) value for the environment variable
ENV[var] = value
end
# execute the caller's block, capture the return value
rv = yield
# execute the caller's block, returning its value
yield
# use an ensure block to make absolutely sure we restore the variables
ensure
# restore the old values
Expand All @@ -38,8 +38,6 @@ def with_env(values)
ENV.delete(var)
end
end
# return the captured return value
rv
end

def execute(command, options = {})
Expand Down

0 comments on commit eda1bdf

Please sign in to comment.