summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-03-10 13:22:31 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-03-10 13:22:31 -0700
commit6c5e845e766ed41aefba9efd5e6b2ddd942c8596 (patch)
tree3d40635ff6820827fc227e1c1e748a5b73d224b6
parente88c653016a1f0c5a115c762d9f727fcdfc59d43 (diff)
downloadchef-6c5e845e766ed41aefba9efd5e6b2ddd942c8596.tar.gz
Break super long string up onto multiple lines
-rw-r--r--lib/chef/util/powershell/cmdlet.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/util/powershell/cmdlet.rb b/lib/chef/util/powershell/cmdlet.rb
index 40edbb13c6..4ad3656b57 100644
--- a/lib/chef/util/powershell/cmdlet.rb
+++ b/lib/chef/util/powershell/cmdlet.rb
@@ -57,7 +57,10 @@ class Chef::Util::Powershell
end
json_command = @json_format ? " | convertto-json -compress -depth #{json_depth}" : ""
- command_string = "powershell.exe -executionpolicy bypass -noprofile -noninteractive -command \"trap [Exception] {write-error -exception ($_.Exception.Message);exit 1};#{@cmdlet} #{switches_string} #{arguments_string}#{json_command}\";if ( ! $? ) { exit 1 }"
+ command_string = "powershell.exe -executionpolicy bypass -noprofile -noninteractive "\
+ "-command \"trap [Exception] {write-error -exception "\
+ "($_.Exception.Message);exit 1};#{@cmdlet} #{switches_string} "\
+ "#{arguments_string}#{json_command}\";if ( ! $? ) { exit 1 }"
augmented_options = {:returns => [0], :live_stream => false}.merge(execution_options)
command = Mixlib::ShellOut.new(command_string, augmented_options)
@@ -133,4 +136,3 @@ class Chef::Util::Powershell
end
end
end
-