Make parameter mandatory

This commit is contained in:
Alexander Karatarakis 2017-11-09 17:52:04 -08:00
parent 138bce34f2
commit eabacf0d14

View File

@ -145,9 +145,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
# Using this to wait for the execution to finish
function Invoke-Command()
{
param ( [string]$program = $(throw "Please specify a program" ),
param ( [Parameter(Mandatory=$true)][string]$program,
[string]$argumentString = "",
[switch]$waitForExit )
[switch]$waitForExit = $false )
$psi = new-object "Diagnostics.ProcessStartInfo"
$psi.FileName = $program