From eabacf0d14b288f8d8a530cbefce09f7e26aa981 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 17:52:04 -0800 Subject: Make parameter mandatory --- scripts/fetchDependency.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index f90a51290..b185336f5 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -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" ), - [string]$argumentString = "", - [switch]$waitForExit ) + param ( [Parameter(Mandatory=$true)][string]$program, + [string]$argumentString = "", + [switch]$waitForExit = $false ) $psi = new-object "Diagnostics.ProcessStartInfo" $psi.FileName = $program -- cgit v1.2.3