From 50bacbd40cc6b5535a8c2d28bea94e65792aeb6b Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 19 Aug 2026 19:30:54 +0800 Subject: [PATCH] fix: force LF line endings for SVG assets; fix remappings typo - Add .gitattributes forcing eol=lf for img/*.svg so vm.readFile() base64 output is deterministic regardless of core.autocrlf / Windows checkout behavior. Fixes testFlipTokenToSad() failing with CRLF checked-out SVGs. - Correct 'remappping' -> 'remappings' in foundry.toml (was emitting a build warning). --- .gitattributes | 4 ++++ foundry.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1cb7f10 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# Force LF line endings for asset files read by forge scripts (vm.readFile) +# so the working tree always matches what's stored in git, regardless of +# core.autocrlf / Windows checkout behavior. +img/*.svg text eol=lf diff --git a/foundry.toml b/foundry.toml index 63203e7..79d60db 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,7 +6,7 @@ fs_permissions = [ { access = "read", path = "./img/" }, { access = "read", path = "./broadcast" }, ] -remappping = ["@openzeppelin/contracts=lib/openzeppelin-contracts/contracts"] +remappings = ["@openzeppelin/contracts=lib/openzeppelin-contracts/contracts"] ffi = true # For use of DevOpsTools import from lib/foundry-devops/src/DevOopsTools.sol [etherscan]