summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-08-12 10:58:15 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-08-16 18:41:25 -0700
commit8069ed78dc8ed361f81064bca4da4b63c72559a4 (patch)
treec6cd54adfa2310eb48810a1e31fbce40dcb60c03 /lib/chef/util
parent7fc41c51ef4fcfd68b38971336bfa9b728066a19 (diff)
downloadchef-8069ed78dc8ed361f81064bca4da4b63c72559a4.tar.gz
fixing Style/MultilineTernaryOperator cop
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/powershell/cmdlet.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/util/powershell/cmdlet.rb b/lib/chef/util/powershell/cmdlet.rb
index 6ab380c071..e300266b1e 100644
--- a/lib/chef/util/powershell/cmdlet.rb
+++ b/lib/chef/util/powershell/cmdlet.rb
@@ -62,8 +62,11 @@ class Chef
json_depth = @output_format_options[:depth]
end
- json_command = @json_format ? " | convertto-json -compress -depth #{json_depth} "\
- "> #{streams[:json].path}" : ""
+ json_command = if @json_format
+ " | convertto-json -compress -depth #{json_depth} > #{streams[:json].path}"
+ else
+ ""
+ end
redirections = "4> '#{streams[:verbose].path}'"
command_string = "powershell.exe -executionpolicy bypass -noprofile -noninteractive "\
"-command \"trap [Exception] {write-error -exception "\