From d3eddf45a03cc5fff36ccfc47be8426df83c4f08 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Thu, 5 Dec 2024 08:57:57 +0100 Subject: [PATCH] Fix powershell wrapper --- tools/bazel_wrapper.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/bazel_wrapper.ps1 b/tools/bazel_wrapper.ps1 index 0420ead..7e4f032 100644 --- a/tools/bazel_wrapper.ps1 +++ b/tools/bazel_wrapper.ps1 @@ -24,8 +24,16 @@ while ($args.Count -gt 0) { } # Get the command and remaining arguments -$command = $args[0] -$args = $args[1..$($args.Count - 1)] +if ($args.Count -gt 0) { + $command = $args[0] + if ($args.Count -gt 1) { + $args = $args[1..($args.Count - 1)] + } else { + $args = @() + } +} else { + $args = @() +} # Execute Bazel with the collected options and arguments & $Env:BAZEL_REAL @startup_options $command $config @args