summaryrefslogtreecommitdiff
path: root/lib/chef/resource/powershell_script.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-15 15:51:41 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-15 16:08:38 -0700
commit92125c9aba6cf734b4c60db98abc137fccdf285d (patch)
tree0a60436e49378b34728d614665fcf2442e76e0e7 /lib/chef/resource/powershell_script.rb
parent27bd4d9dc82be94873418af1e153d73d5cced97f (diff)
downloadchef-92125c9aba6cf734b4c60db98abc137fccdf285d.tar.gz
More resource documentation improvement
Prevent tagging a resource new in Chef 11. No one cares Use the full product name instead of the client name in another spot Move the resource description in powershell_script to above the properties Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/powershell_script.rb')
-rw-r--r--lib/chef/resource/powershell_script.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/resource/powershell_script.rb b/lib/chef/resource/powershell_script.rb
index 768d5f6ca7..784df68db1 100644
--- a/lib/chef/resource/powershell_script.rb
+++ b/lib/chef/resource/powershell_script.rb
@@ -26,6 +26,12 @@ class Chef
provides :powershell_script, os: "windows"
+ description <<~DESC
+ Use the **powershell_script** resource to execute a script using the Windows PowerShell interpreter, much like how the script and script-based resources **bash**, **csh**, **perl**, **python**, and **ruby** are used. The **powershell_script** resource is specific to the Microsoft Windows platform, but may use both the the Windows PowerShell interpreter or the PowerShell Core (pwsh) interpreter as of Chef Infra Client 16.6 and later.
+
+ The **powershell_script** resource creates and executes a temporary file rather than running the command inline. Commands that are executed with this resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are run. Use `not_if` and `only_if` conditionals to guard this resource for idempotence.
+ DESC
+
property :flags, String,
description: "A string that is passed to the Windows PowerShell command"
@@ -58,12 +64,6 @@ class Chef
```
DESC
- description <<~DESC
- Use the **powershell_script** resource to execute a script using the Windows PowerShell interpreter, much like how the script and script-based resources **bash**, **csh**, **perl**, **python**, and **ruby** are used. The **powershell_script** resource is specific to the Microsoft Windows platform, but may use both the the Windows PowerShell interpreter or the PowerShell Core (pwsh) interpreter as of Chef Infra Client 16.6 and later.
-
- The **powershell_script** resource creates and executes a temporary file rather than running the command inline. Commands that are executed with this resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are run. Use `not_if` and `only_if` conditionals to guard this resource for idempotence.
- DESC
-
def initialize(*args)
super
@default_guard_interpreter = resource_name