[Backend::Exec] ensure no Ruby envvars are present when running command. #300

Merged
merged 1 commit into from Nov 27, 2013

Conversation

Projects
None yet
2 participants
@fnichol
Contributor

fnichol commented Nov 26, 2013

This should help better simulate invoking a non-interactive shell
command that is free of current Ruby environment variables such as
GEM_HOME and GEM_PATH.

If specific environment variables need to be set for the command to
succeed, then a pre_command can be used to prepare the command's
environment.

This will help other tools like Test Kitchen (via the busser-serverspec
runner plugin) to run Ruby programs such as 'chef-client' from an
Omnibus package installation without poluting/corrupting the gem
environment being passed on.

See test-kitchen/test-kitchen#242 for more gory details.

[Backend::Exec] ensure no Ruby envvars are present when running command.
This should help better simulate invoking a non-interactive shell
command that is free of current Ruby environment variables such as
`GEM_HOME` and `GEM_PATH`.

If specific environment variables need to be set for the command to
succeed, then a pre_command can be used to prepare the command's
environment.

This will help other tools like Test Kitchen (via the busser-serverspec
runner plugin) to run Ruby programs such as 'chef-client' from an
Omnibus package installation without poluting/corrupting the gem
environment being passed on.

See test-kitchen/test-kitchen#242 for more gory details.

@fnichol fnichol referenced this pull request in test-kitchen/test-kitchen Nov 26, 2013

Closed

Gem path issues after test-kitchen beta 4 new sandbox. #242

@fnichol

This comment has been minimized.

Show comment
Hide comment
@fnichol

fnichol Nov 26, 2013

Contributor

Hi there, I realize that I haven't yet submitted any specs to cover this change, but I'd like to get some feedback first to make sure:

  • this is on the right track
  • this change is in line with the codebase
  • there aren't any other hidden issues this could produce (this behavior could possibly be enabled with a configuration??)

Anyway, thank you so so very much for Serverspec. This is an amazingly useful project for our community!!

Contributor

fnichol commented Nov 26, 2013

Hi there, I realize that I haven't yet submitted any specs to cover this change, but I'd like to get some feedback first to make sure:

  • this is on the right track
  • this change is in line with the codebase
  • there aren't any other hidden issues this could produce (this behavior could possibly be enabled with a configuration??)

Anyway, thank you so so very much for Serverspec. This is an amazingly useful project for our community!!

mizzy added a commit that referenced this pull request Nov 27, 2013

Merge pull request #300 from fnichol/exec-with-clean-ruby-environment
[Backend::Exec] ensure no Ruby envvars are present when running command.

@mizzy mizzy merged commit d7e62bf into mizzy:master Nov 27, 2013

1 check passed

default The Travis CI build passed
Details
@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Nov 27, 2013

Owner

LGTM. Thanks! I've merged and released as v0.11.5.

Owner

mizzy commented Nov 27, 2013

LGTM. Thanks! I've merged and released as v0.11.5.

@fnichol fnichol deleted the fnichol:exec-with-clean-ruby-environment branch Nov 27, 2013

@fnichol

This comment has been minimized.

Show comment
Hide comment
@fnichol

fnichol Nov 27, 2013

Contributor

That's great news, thank you for the fast turnaround!

Contributor

fnichol commented Nov 27, 2013

That's great news, thank you for the fast turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment