Module: VagrantPlugins::GuestMSYS2::Util::CapHelpers

Defined in:
lib/vagrant-guest-msys2/util/cap_helpers.rb

Class Method Summary collapse

Class Method Details

.wrap_powershell(script) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/vagrant-guest-msys2/util/cap_helpers.rb', line 5

def self.wrap_powershell(script)
  wrapped = "    cat << 'EOF' | powershell -InputFormat none -Command - \n    \#{script}\n    EOF\n  EOH\n  wrapped\nend\n".gsub(/^ {12}/, '')