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

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

Merged
merged 1 commit into from Nov 27, 2013
Merged

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

merged 1 commit into from Nov 27, 2013

Conversation

@fnichol
Copy link
Contributor

@fnichol 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.

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
Copy link
Contributor Author

@fnichol 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 issue Nov 27, 2013
[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
@mizzy
Copy link
Owner

@mizzy mizzy commented Nov 27, 2013

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

@fnichol fnichol deleted the exec-with-clean-ruby-environment branch Nov 27, 2013
@fnichol
Copy link
Contributor Author

@fnichol 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
Labels
None yet
Projects
None yet
2 participants