Merge pull request #14653 from manveru/bundler-env-frozen

bundler-env: Gemfile.lock is frozen
This commit is contained in:
zimbatm 2016-04-14 10:20:04 +01:00
commit 12e919bb34
2 changed files with 2 additions and 6 deletions

View File

@ -40,12 +40,6 @@ let
mkdir -p $out
cp ${gemfile} $out/Gemfile
cp ${lockfile} $out/Gemfile.lock
cd $out
chmod +w Gemfile.lock
export GEM_PATH=${bundler}/${ruby.gemPath}
${ruby}/bin/ruby -rubygems -e \
"require 'bundler'; Bundler.definition.lock('Gemfile.lock')"
'';
envPaths = lib.attrValues gems ++ lib.optional (!hasBundler) bundler;
bundlerEnv = buildEnv {
@ -72,6 +66,7 @@ let
makeWrapper "$i" $out/bin/$(basename "$i") \
--set BUNDLE_GEMFILE ${confFiles}/Gemfile \
--set BUNDLE_PATH ${bundlerEnv}/${ruby.gemPath} \
--set BUNDLE_FROZEN 1 \
--set GEM_HOME ${bundlerEnv}/${ruby.gemPath} \
--set GEM_PATH ${bundlerEnv}/${ruby.gemPath}
done

View File

@ -31,6 +31,7 @@ paths.each do |path|
ENV["BUNDLE_GEMFILE"] = "#{gemfile}"
ENV["BUNDLE_PATH"] = "#{bundle_path}"
ENV['BUNDLE_FROZEN'] = '1'
Gem.use_paths("#{bundler_gem_path}", ENV["GEM_PATH"])