summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authormwrock <matt@mattwrock.com>2020-10-01 16:31:42 -0700
committermwrock <matt@mattwrock.com>2020-10-01 16:31:42 -0700
commitc811d58a84cc2b92a24b28b3557f03c4ce17b5bc (patch)
tree8297a747d40a65822eccc55c8df57fe3c3e31967 /spec/support
parent6b077d998a0c3168cb7edb19d9d70d122ecafc95 (diff)
downloadchef-c811d58a84cc2b92a24b28b3557f03c4ce17b5bc.tar.gz
add interpreter arg to powershell_out allowing it to call pwsh.exe
Signed-off-by: mwrock <matt@mattwrock.com>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/platform_helpers.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 51a9299497..60990f73a5 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -243,5 +243,10 @@ end
def choco_installed?
result = ShellHelpers.powershell_out("choco --version")
- result.stderr.empty? ? true : false
+ result.stderr.empty?
+end
+
+def pwsh_installed?
+ result = ShellHelpers.powershell_out("pwsh.exe --version")
+ result.stderr.empty?
end