Skip to content

Commit

Permalink
(MAINT) Add package bin path to subprocess PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
austb committed Aug 16, 2017
1 parent a85608b commit 0f48335
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pdk/cli/exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,12 @@ def execute!
end

# Make sure invocation of Ruby prefers our private installation.
package_binpath = PDK::Util.package_install? ? File.join(PDK::Util.pdk_package_basedir, 'bin') : nil
@process.environment['PATH'] = [
RbConfig::CONFIG['bindir'],
File.join(@process.environment['GEM_HOME'], 'bin'),
File.join(@process.environment['GEM_PATH'], 'bin'),
package_binpath,
ENV['PATH'],
].compact.join(File::PATH_SEPARATOR)

Expand Down

0 comments on commit 0f48335

Please sign in to comment.