b733e551a0
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
315 B
Bash
17 lines
315 B
Bash
# shellcheck shell=bash
|
|
# 供 run_agent.sh / run_hub.sh source:加载 .env 并去掉 Windows CRLF($'\r')
|
|
load_dotenv_file() {
|
|
local f="$1"
|
|
if [[ ! -f "${f}" ]]; then
|
|
return 1
|
|
fi
|
|
set -a
|
|
set +e
|
|
# shellcheck disable=SC1090
|
|
. <(sed 's/\r$//' "${f}")
|
|
local rc=$?
|
|
set -e
|
|
set +a
|
|
return "${rc}"
|
|
}
|