Skip to content

Commit

Permalink
Fixed default arguments not being passed properly
Browse files Browse the repository at this point in the history
(cherry picked from commit 5826e30)
  • Loading branch information
gxosty authored and slouken committed Dec 17, 2024
1 parent 96126fe commit 004ca45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions external/Get-GitModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
[String] $PathRegex = "path\s*=\s*(?<path>.*)"
[String] $URLRegex = "url\s*=\s*(?<url>.*)"
[String] $BranchRegex = "branch\s*=\s*(?<Branch>.*)"
[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) {
Expand Down

0 comments on commit 004ca45

Please sign in to comment.