Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mirror
chef
Commits
6761fcae
Commit
6761fcae
authored
Dec 01, 2022
by
Thomas Powell
Browse files
pwsh
parent
436c0fd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
.expeditor/scripts/more_basic_powershell.rb
View file @
6761fcae
...
...
@@ -2,10 +2,13 @@ require 'chef-powershell'
include
ChefPowerShell
::
ChefPowerShellModule
::
PowerShellExec
puts
powershell_exec!
(
'gci'
,
:pwsh
).
result
puts
'pwsh exec'
puts
powershell_exec!
(
'gci'
).
result
puts
'vanilla exec'
cmd
=
ChefPowerShell
::
PowerShell
.
new
(
'gci'
)
puts
cmd
.
result
puts
'all exec'
case
ARGV
[
0
]
when
/pwsh/
puts
powershell_exec!
(
'gci'
,
:pwsh
).
result
when
/default/
puts
powershell_exec!
(
'gci'
).
result
when
/object/
cmd
=
ChefPowerShell
::
PowerShell
.
new
(
'gci'
)
puts
cmd
.
result
end
.expeditor/scripts/test_powershells.ps1
View file @
6761fcae
...
...
@@ -15,4 +15,12 @@ Write-Output "--- bundle install"
bundle
config
set
--local
without
'omnibus_package'
bundle
install
--jobs
=
3
--retry
=
3
$
env
:
PATH
=
"C:\Program Files (x86)\Uru;"
+
$
env
:
PATH
bundle
exec
ruby
.
\.expeditor\scripts\more_basic_powershell.rb
Write-Output
"--- pwsh"
bundle
exec
ruby
.
\.expeditor\scripts\more_basic_powershell.rb
pwsh
Write-Output
"--- default"
bundle
exec
ruby
.
\.expeditor\scripts\more_basic_powershell.rb
default
Write-Output
"--- object"
bundle
exec
ruby
.
\.expeditor\scripts\more_basic_powershell.rb
object
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment