summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-10-18 11:52:53 -0700
committerTim Smith <tsmith@chef.io>2017-10-18 11:52:53 -0700
commit105bc48349973ab966aa82d25262434030e13ed7 (patch)
treeaf31c76f4131b3df8afed3f8ef141de476da70a9
parent5747a43b5ce8117e3b11664423ef598966feab1a (diff)
downloadchef-105bc48349973ab966aa82d25262434030e13ed7.tar.gz
Don't use the safe navigation operator which requires Ruby 2.3
This was backported from Chef 13 where we require Ruby 2.3. This won't work in Ruby 2.2. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/util/dsc/lcm_output_parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb
index f19f637b6d..9fc12fad74 100644
--- a/lib/chef/util/dsc/lcm_output_parser.rb
+++ b/lib/chef/util/dsc/lcm_output_parser.rb
@@ -85,7 +85,7 @@ class Chef
resources = []
lcm_output.lines.each do |line|
op_action , op_value = line.strip.split(":")
- op_action&.strip!
+ op_action && op_action.strip!
case op_action
when "InDesiredState"
current_resource[:skipped] = op_value.strip == "True" ? true : false