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 ed5ca0e)
  • Loading branch information
gxosty authored and slouken committed Dec 17, 2024
1 parent 2ff2a38 commit 2d953d9
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 2d953d9

Please sign in to comment.