diff options
author | Tim Smith <tsmith@chef.io> | 2018-09-07 14:37:50 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-09-07 14:37:50 -0700 |
commit | 94950242ab21af1b046518adac53b908311d7354 (patch) | |
tree | d9f550e023a9f64b72d1a382eb2c7c1fa37c54a4 /lib/chef/provider | |
parent | 67e6a0572261f42e0d58d6079fbe2933744e8aaf (diff) | |
download | chef-94950242ab21af1b046518adac53b908311d7354.tar.gz |
Properly capitalize PowerShell in descriptions and errorspowershell
It's PowerShell not Powershell. Our docs site had already been updated.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/dsc_resource.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/dsc_script.rb | 8 | ||||
-rw-r--r-- | lib/chef/provider/package/powershell.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/powershell_script.rb | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb index 3a209a08a1..864373f902 100644 --- a/lib/chef/provider/dsc_resource.rb +++ b/lib/chef/provider/dsc_resource.rb @@ -48,10 +48,10 @@ class Chef def define_resource_requirements requirements.assert(:run) do |a| a.assertion { supports_dsc_invoke_resource? } - err = ["You must have Powershell version >= 5.0.10018.0 to use dsc_resource."] + err = ["You must have PowerShell version >= 5.0.10018.0 to use dsc_resource."] a.failure_message Chef::Exceptions::ProviderNotFound, err - a.whyrun err + ["Assuming a previous resource installs Powershell 5.0.10018.0 or higher."] + a.whyrun err + ["Assuming a previous resource installs PowerShell 5.0.10018.0 or higher."] a.block_action! end requirements.assert(:run) do |a| diff --git a/lib/chef/provider/dsc_script.rb b/lib/chef/provider/dsc_script.rb index fd20f34786..4a44a9ea23 100644 --- a/lib/chef/provider/dsc_script.rb +++ b/lib/chef/provider/dsc_script.rb @@ -63,11 +63,11 @@ class Chef err = [ "Could not find PowerShell DSC support on the system", powershell_info_str, - "Powershell 4.0 or higher was not detected on your system and is required to use the dsc_script resource.", + "PowerShell 4.0 or higher was not detected on your system and is required to use the dsc_script resource.", ] a.assertion { supports_dsc? } a.failure_message Chef::Exceptions::ProviderNotFound, err.join(" ") - a.whyrun err + ["Assuming a previous resource installs Powershell 4.0 or higher."] + a.whyrun err + ["Assuming a previous resource installs PowerShell 4.0 or higher."] a.block_action! end end @@ -175,9 +175,9 @@ class Chef def powershell_info_str if run_context && run_context.node[:languages] && run_context.node[:languages][:powershell] - install_info = "Powershell #{run_context.node[:languages][:powershell][:version]} was found on the system." + install_info = "PowerShell #{run_context.node[:languages][:powershell][:version]} was found on the system." else - install_info = "Powershell was not found." + install_info = "PowerShell was not found." end end end diff --git a/lib/chef/provider/package/powershell.rb b/lib/chef/provider/package/powershell.rb index a65146b1e3..9af1344138 100644 --- a/lib/chef/provider/package/powershell.rb +++ b/lib/chef/provider/package/powershell.rb @@ -37,7 +37,7 @@ class Chef def define_resource_requirements super if powershell_out("$PSVersionTable.PSVersion.Major").stdout.strip.to_i < 5 - raise "Minimum installed Powershell Version required is 5" + raise "Minimum installed PowerShell Version required is 5" end requirements.assert(:install) do |a| a.assertion { candidates_exist_for_all_uninstalled? } diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index 31521c3675..529ae409d8 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -129,7 +129,7 @@ EOH "-NonInteractive", "-NoProfile", "-ExecutionPolicy #{execution_policy}", - # Powershell will hang if STDIN is redirected + # PowerShell will hang if STDIN is redirected # http://connect.microsoft.com/PowerShell/feedback/details/572313/powershell-exe-can-hang-if-stdin-is-redirected "-InputFormat None", ] @@ -137,10 +137,10 @@ EOH # A wrapper script is used to launch user-supplied script while # still obtaining useful process exit codes. Unless you - # explicitly call exit in Powershell, the powershell.exe + # explicitly call exit in PowerShell, the powershell.exe # interpreter returns only 0 for success or 1 for failure. Since # we'd like to get specific exit codes from executable tools run - # with Powershell, we do some work using the automatic variables + # with PowerShell, we do some work using the automatic variables # $? and $LASTEXITCODE to return the process exit code of the # last process run in the script if it is the last command # executed, otherwise 0 or 1 based on whether $? is set to true |