Skip to content

Commit

Permalink
fix: ensure env doesn't get clobbered when installing package_json
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Nov 22, 2024
1 parent c0e3fe5 commit 8ee9624
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def puts_header(msg)
JEST_MAJOR_VERSION = "29".freeze

def require_package_json_gem
old_env = ENV.to_h

require "bundler/inline"

gemfile(true) do
Expand All @@ -105,6 +107,8 @@ def require_package_json_gem
end

puts "using package_json v#{PackageJson::VERSION}"

ENV.replace(old_env)
end

def apply_template! # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
Expand Down

0 comments on commit 8ee9624

Please sign in to comment.