Can I pass an array as a single argument from vagrantfile to powershell script? -
my current setup follows:
i have vagrant file set provisioning:
config.vm.provision 'test', :type => 'shell', :path => "#{rootdir}/.build/vagrant-scripts/sandbox-test.ps1", :powershell_elevated_interactive => true, :args => ["1", "2"]
my power shell script set print out names individually:
param( [parameter(mandatory=$true, position=1)] [string[]]$array ) foreach($a in $array) { $a }
i'm aware above example has incorrect format args, can't figure out how pass array vagrantfile (which written in ruby?) powershell script.
i fine doing such this, know works time being:
foreach($a in $args) { $a }
however want introduce multiple arrays, functionality break unless i'm specific size of different arrays.
i hope i'm trying clear enough, please feel free ask more information , in advance assistance.
Comments
Post a Comment