summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-10-19 15:40:25 -0700
committerGitHub <noreply@github.com>2016-10-19 15:40:25 -0700
commitcad49f7fcdbe5c7e1a4e7c7dc3d66d78e8828f47 (patch)
treeaf020d9c2d9e6747e42e2af5cd0ba748e1a8c37e
parentff7753330255c6f6cdc0f2d01983cf31615989a7 (diff)
parent341bcd93a9416c99bd67db4258a37fb4f362bc92 (diff)
downloadchef-cad49f7fcdbe5c7e1a4e7c7dc3d66d78e8828f47.tar.gz
Merge pull request #5466 from pwalz/fix-crontab-rewrites
Cron Provider: Eliminate crontab rewrite that happens with every chef-client run
-rw-r--r--lib/chef/provider/cron.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb
index 7baaeec0c5..35e5bb874c 100644
--- a/lib/chef/provider/cron.rb
+++ b/lib/chef/provider/cron.rb
@@ -199,7 +199,7 @@ class Chef
def set_environment_var(attr_name, attr_value)
if %w{MAILTO PATH SHELL HOME}.include?(attr_name)
- @current_resource.send(attr_name.downcase.to_sym, attr_value)
+ @current_resource.send(attr_name.downcase.to_sym, attr_value.gsub(/^"|"$/, ""))
else
@current_resource.environment(@current_resource.environment.merge(attr_name => attr_value))
end