From b50a902cdb65bc2e8f9f024ad376ca7a17f8fb31 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sun, 31 Oct 2010 21:18:00 -0700 Subject: Explain shelling out using with_clean_env in the bundle exec help --- man/bundle-exec.ronn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'man/bundle-exec.ronn') diff --git a/man/bundle-exec.ronn b/man/bundle-exec.ronn index 8797a55652..f5b61c8e65 100644 --- a/man/bundle-exec.ronn +++ b/man/bundle-exec.ronn @@ -56,6 +56,19 @@ It also modifies Rubygems: making system executables work * Add all gems in the bundle into Gem.loaded_specs +### Shelling out + +When shelling out (using the `system` or backticks methods, +for example), Bundler's environment changes will propogate to +the subshell environment. If you desire to shell out without +Bundler's environment changes, simply employ the `with_clean_env` +method. It will restore all environment variables to what they +were before Bundler was activated. For example: + + Bundler.with_clean_env do + `brew install wget` + end + ## RUBYGEMS PLUGINS At present, the Rubygems plugin system requires all files -- cgit v1.2.1