Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Changed ChefDK::Helpers.omnibus_env to set GEM_HOME to Gem.user_dir i…
Browse files Browse the repository at this point in the history
…nstead of GEM_HOME. Also changed the tests to expect that as well. It works for me, but really not clear where Gem.user_dir comes from and if this may cause other people other problems.
  • Loading branch information
rberger committed Sep 16, 2014
1 parent 997cf31 commit f66ae32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/chef-dk/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def omnibus_env
{
'PATH' => "#{omnibus_bin_dir}:#{user_bin_dir}:#{omnibus_embedded_bin_dir}:#{ENV['PATH']}",
'GEM_ROOT' => Gem.default_dir.inspect,
'GEM_HOME' => Gem.paths.home,
'GEM_HOME' => Gem.user_dir,
'GEM_PATH' => Gem.path.join(':'),
}
end
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/command/exec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run_command

let(:expected_GEM_ROOT) { Gem.default_dir.inspect }

let(:expected_GEM_HOME) { ENV['GEM_HOME'] }
let(:expected_GEM_HOME) { Gem.user_dir }

let(:expected_GEM_PATH) { Gem.path.join(':') }

Expand Down Expand Up @@ -107,7 +107,7 @@ def run_command

let(:expected_GEM_ROOT) { Gem.default_dir.inspect }

let(:expected_GEM_HOME) { ENV['GEM_HOME'] }
let(:expected_GEM_HOME) { Gem.user_dir }

let(:expected_GEM_PATH) { Gem.path.join(':') }

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/command/shell_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

let(:expected_gem_root) { Gem.default_dir.to_s }

let(:expected_gem_home) { ENV['GEM_HOME'] }
let(:expected_gem_home) { Gem.user_dir }

let(:expected_gem_path) { Gem.path.join(':') }

Expand Down

0 comments on commit f66ae32

Please sign in to comment.