diff options
author | Pierre Ynard <p.ynard@criteo.com> | 2014-07-02 17:56:44 +0200 |
---|---|---|
committer | Pierre Ynard <p.ynard@criteo.com> | 2014-07-02 17:56:44 +0200 |
commit | 9459638a8db3f2716b9b9c7f6bd63df70e78caac (patch) | |
tree | 6295ceb5569be4980d295691ec078eddedd9cc6c /lib/chef/provider/env.rb | |
parent | a06bc951fc9ac04200988f596c04cdf5c686e04e (diff) | |
download | chef-9459638a8db3f2716b9b9c7f6bd63df70e78caac.tar.gz |
Don't modify variable passed to env resource when updating
When using a delimiter, the passed value is prepended to the given
environment variable. Unfortunately this has the side effect of modifying
the variable passed to the resource. Oftentimes this is an attribute,
used somewhere else after that, with the wrong, modified value.
Diffstat (limited to 'lib/chef/provider/env.rb')
-rw-r--r-- | lib/chef/provider/env.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/env.rb b/lib/chef/provider/env.rb index e857d74d68..e91b8bbb97 100644 --- a/lib/chef/provider/env.rb +++ b/lib/chef/provider/env.rb @@ -143,7 +143,7 @@ class Chef def modify_env if @new_resource.delim #e.g. add to PATH - @new_resource.value << @new_resource.delim << @current_resource.value + @new_resource.value(@new_resource.value + @new_resource.delim + @current_resource.value) end create_env end |