Skip to content

Commit ce78eff

Browse files
gfraiteurclaude
andcommitted
Fix git safe.directory path normalization in DockerBuild.ps1
The regex '\\' was looking for double backslashes but Windows paths have single backslashes. Changed to '\' to properly convert C:\path to C:/path for git safe.directory config. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 31f1cbc commit ce78eff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DockerBuild.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ $( ($GitDirectories | ForEach-Object { " '$_'" }) -join ",`n" )
11361136
foreach (`$dir in `$gitDirectories) {
11371137
if (`$dir) {
11381138
# Normalize path: convert backslashes to forward slashes, add trailing slash
1139-
`$normalizedDir = (`$dir -replace '\\\\', '/').TrimEnd('/') + '/'
1139+
`$normalizedDir = (`$dir -replace '\\', '/').TrimEnd('/') + '/'
11401140
git config --global --add safe.directory `$normalizedDir
11411141
}
11421142
}

src/PostSharp.Engineering.BuildTools/Resources/DockerBuild.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ $( ($GitDirectories | ForEach-Object { " '$_'" }) -join ",`n" )
11361136
foreach (`$dir in `$gitDirectories) {
11371137
if (`$dir) {
11381138
# Normalize path: convert backslashes to forward slashes, add trailing slash
1139-
`$normalizedDir = (`$dir -replace '\\\\', '/').TrimEnd('/') + '/'
1139+
`$normalizedDir = (`$dir -replace '\\', '/').TrimEnd('/') + '/'
11401140
git config --global --add safe.directory `$normalizedDir
11411141
}
11421142
}

0 commit comments

Comments
 (0)