diff --git a/win/utils/tools.ps1 b/win/utils/tools.ps1 index 0e5cdadfc7..322e306651 100644 --- a/win/utils/tools.ps1 +++ b/win/utils/tools.ps1 @@ -223,7 +223,12 @@ function main { & setup_build_cfg # Dispatch command. $command = $Args[0] - $command_args = $Args[1..($args.Count - 1)] + if ($args.Count -gt 1) { + $command_args = $Args[1..($args.Count - 1)] + } + else { + $command_args = @() + } & $command @command_args }