From 6b252598dece80baeb0e7a0ead3dd608ecc70ae2 Mon Sep 17 00:00:00 2001 From: Amirhossein Khalili Date: Wed, 25 Mar 2026 01:22:31 +0800 Subject: [PATCH] fix(env): add .gitattributes to automatically change Windows-style line endings (CRLF) to Unix-style line endings (LF) --- .gitattributes | 8 ++++++++ run.sh | 1 + 2 files changed, 9 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..344e84e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted to LF on checkout. +*.sh text eol=lf +*.env text eol=lf +.env.example text eol=lf +docker-compose.yml text eol=lf diff --git a/run.sh b/run.sh index 924188f..25f7a06 100644 --- a/run.sh +++ b/run.sh @@ -12,6 +12,7 @@ if [ ! -f .env ]; then fi # Load environment variables +tr -d '\r' < .env > .env.tmp && mv .env.tmp .env source .env # 2. Handle Reverse Proxy and SSL Configuration