From 004ca457be50356ee611b9626d40f342427b2ba1 Mon Sep 17 00:00:00 2001 From: gxosty <6321b5arsi@gmail.com> Date: Tue, 17 Dec 2024 21:07:37 +0500 Subject: [PATCH] Fixed default arguments not being passed properly (cherry picked from commit 5826e304f72e335b8ea17d484bd45b41dac51b5a) --- external/Get-GitModules.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/external/Get-GitModules.ps1 b/external/Get-GitModules.ps1 index a2791616..85c9850e 100644 --- a/external/Get-GitModules.ps1 +++ b/external/Get-GitModules.ps1 @@ -14,11 +14,11 @@ [String] $PathRegex = "path\s*=\s*(?.*)" [String] $URLRegex = "url\s*=\s*(?.*)" [String] $BranchRegex = "branch\s*=\s*(?.*)" -[String] $Arguments = $($args -join " ") +[String[]] $Arguments = $args #------- Script ---------------------------------------------------------------- -if ([string]::IsNullOrEmpty($Arguments)) { - $Arguments = "--depth 1" +if (-not $Arguments) { + [String[]]$Arguments = "--depth", "1" } foreach ($Line in Get-Content $PSScriptRoot\..\.gitmodules) {