Skip to content

Commit 028ac2e

Browse files
iamaeroplaneclaude
andcommitted
fix(powershell): use LiteralPath for .git check in Test-HasGit
Prevents Test-Path from treating wildcard characters in paths as globs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6df0d5f commit 028ac2e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/powershell/common.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ function Test-HasGit {
101101
}
102102
$repoRoot = Get-RepoRoot
103103
# Check if .git exists (directory or file for worktrees/submodules)
104-
if (-not (Test-Path (Join-Path $repoRoot ".git"))) {
104+
# Use -LiteralPath to handle paths with wildcard characters
105+
if (-not (Test-Path -LiteralPath (Join-Path $repoRoot ".git"))) {
105106
return $false
106107
}
107108
# Verify it's actually a valid git work tree

0 commit comments

Comments
 (0)