Class: Chef::Pwsh

Inherits:
PowerShell
  • Object
show all
Defined in:
lib/chef/pwsh.rb

Instance Method Summary collapse

Constructor Details

#initialize(script, timeout: -1)) ⇒ Object

Run a command under pwsh (powershell core) via FFI This implementation requires the managed dll, native wrapper and a published, self contained dotnet core directory tree to exist in the bindir directory.

Parameters:

  • script (String)

    script to run

  • timeout (Integer, nil) (defaults to: -1))

    timeout in seconds.



29
30
31
32
# File 'lib/chef/pwsh.rb', line 29

def initialize(script, timeout: -1)
  @dll = Pwsh.dll
  super
end