Skip to content

Commit b7092a3

Browse files
gfraiteurclaude
andcommitted
Disable git autocrlf in Docker container to fix Claude Code Edit tool
The Edit tool's read-compare-write cycle was failing due to EOL normalization differences between Git, MSYS, and file operations. Setting core.autocrlf=false in the container prevents automatic CRLF/LF conversion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent a447555 commit b7092a3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

DockerBuild.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ if (`$gitUserEmail) {
622622
git config --global user.email `$gitUserEmail
623623
}
624624
625+
# Disable autocrlf to prevent EOL conversion issues with Claude Code's Edit tool
626+
git config --global core.autocrlf false
627+
625628
# Configure git safe.directory for all mounted directories
626629
`$gitDirectories = @(
627630
$( ($GitDirectories | ForEach-Object { " '$_'" }) -join ",`n" )

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ if (`$gitUserEmail) {
622622
git config --global user.email `$gitUserEmail
623623
}
624624
625+
# Disable autocrlf to prevent EOL conversion issues with Claude Code's Edit tool
626+
git config --global core.autocrlf false
627+
625628
# Configure git safe.directory for all mounted directories
626629
`$gitDirectories = @(
627630
$( ($GitDirectories | ForEach-Object { " '$_'" }) -join ",`n" )

0 commit comments

Comments
 (0)