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

(#158) (#166) Resolve issue loading bundler from gem installs #170

Merged
merged 2 commits into from
Jul 18, 2017

Conversation

scotje
Copy link
Contributor

@scotje scotje commented Jul 18, 2017

This changes the method for resolving the installation path of a user
managed bundler gem to make it not depend on bundler itself.

Also cleans up the management of subprocess PATH from SDK-319.

…gem installs

This changes the method for resolving the installation path of a user
managed bundler gem to make it not depend on bundler itself.

Also cleans up the management of subprocess PATH from SDK-319.
@scotje
Copy link
Contributor Author

scotje commented Jul 18, 2017

Validated that the PATH fix still works for packaged builds:

Before:

[|] Checking metadata (metadata.json)strace: Process 22550 attached
[pid 22548] execve("/root/testmod/bin/metadata-json-lint", ["/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */] <unfinished ...>
[pid 22550] +++ exited with 0 +++
[pid 22548] <... execve resumed> )      = 0
[pid 22548] execve("/opt/puppetlabs/bin/ruby", ["ruby", "/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */]) = -1 ENOENT (No such file or directory)
[pid 22548] execve("/usr/local/sbin/ruby", ["ruby", "/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */]) = -1 ENOENT (No such file or directory)
[pid 22548] execve("/usr/local/bin/ruby", ["ruby", "/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */]) = -1 ENOENT (No such file or directory)
[pid 22548] execve("/usr/sbin/ruby", ["ruby", "/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */]) = -1 ENOENT (No such file or directory)
[pid 22548] execve("/usr/bin/ruby", ["ruby", "/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */]) = 0
strace: Process 22551 attached

After:

[|] Checking metadata (metadata.json)strace: Process 22573 attached
[pid 22571] execve("/root/testmod/bin/metadata-json-lint", ["/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */] <unfinished ...>
[pid 22573] +++ exited with 0 +++
[pid 22571] <... execve resumed> )      = 0
[pid 22571] execve("/opt/puppetlabs/pdk/private/ruby/2.1.9/bin/ruby", ["ruby", "/root/testmod/bin/metadata-json-lint", "--format", "json", "/root/testmod/metadata.json"], [/* 22 vars */]) = 0
strace: Process 22574 attached

@scotje scotje merged commit dcf7005 into puppetlabs:master Jul 18, 2017
@scotje scotje deleted the fixup_gem_execution_env branch July 18, 2017 20:55
This was referenced Jul 18, 2017
@scotje scotje added the bug label Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants