Skip to content

Commit f41ef5d

Browse files
gxostyslouken
authored andcommitted
Fixed default arguments not being passed properly
(cherry picked from commit 5826e30) (cherry picked from commit 004ca45)
1 parent 19052dc commit f41ef5d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

external/Get-GitModules.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
[String] $PathRegex = "path\s*=\s*(?<path>.*)"
1515
[String] $URLRegex = "url\s*=\s*(?<url>.*)"
1616
[String] $BranchRegex = "branch\s*=\s*(?<Branch>.*)"
17-
[String] $Arguments = $($args -join " ")
17+
[String[]] $Arguments = $args
1818

1919
#------- Script ----------------------------------------------------------------
20-
if ([string]::IsNullOrEmpty($Arguments)) {
21-
$Arguments = "--depth 1"
20+
if (-not $Arguments) {
21+
[String[]]$Arguments = "--depth", "1"
2222
}
2323

2424
foreach ($Line in Get-Content $PSScriptRoot\..\.gitmodules) {

0 commit comments

Comments
 (0)