Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SDK-319) force usage of our ruby #168

Merged
merged 1 commit into from
Jul 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/pdk/cli/exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def execute!
@process.environment['GEM_PATH'] = bundler_gem_path
end

# TODO: we should probably more carefully manage PATH and maybe other things too

mod_root = PDK::Util.module_root

unless mod_root
Expand All @@ -129,7 +127,13 @@ def execute!

Dir.chdir(mod_root) do
::Bundler.with_clean_env do
run_process!
tmp = ENV['PATH']
begin
ENV['PATH'] = [RbConfig::CONFIG['bindir'], ENV['PATH']].compact.join(File::PATH_SEPARATOR)
run_process!
ensure
ENV['PATH'] = tmp
end
end
end
else
Expand Down