summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Amrhein <karlamrhein@gmail.com>2020-08-12 08:01:38 -0600
committerGitHub <noreply@github.com>2020-08-12 08:01:38 -0600
commita400458de5335da1d91e0c9fc25de6e86008a292 (patch)
tree850d66b50dd95387f92fc73f7a37055272e5b818
parent2505112add8e5e220441a2e5aed5456e7dcc3a72 (diff)
downloadchef-a400458de5335da1d91e0c9fc25de6e86008a292.tar.gz
double quotes in example for string interpolation
In the example: ``` execute 'test_rule' do command 'command_to_run --option value --option value --source \#{node[:name_of_node][:ipsec][:local][:subnet]} -j test_rule' action :nothing end ``` that example command would not run correctly because the variable #{node{node[:name_of_node][:ipsec][:local][:subnet]} would not be evaluated. changing to double quotes fixes the example. Obvious fix.
-rw-r--r--lib/chef/resource/execute.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index c274f9945d..e8d74fa178 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -161,11 +161,11 @@ class Chef
```ruby
execute 'test_rule' do
- command 'command_to_run
+ command "command_to_run
--option value
--option value
--source \#{node[:name_of_node][:ipsec][:local][:subnet]}
- -j test_rule'
+ -j test_rule"
action :nothing
end