From 18fab495667c6b922264f2c99094e5e67217c80d Mon Sep 17 00:00:00 2001 From: xuzhizhen Date: Tue, 31 Mar 2026 04:30:08 -0400 Subject: [PATCH] fix: use --preload= instead of --preload for bun compatibility Bun requires --preload= (equals sign) syntax; space-separated form silently fails to load the preload script. --- src/templates.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates.sh b/src/templates.sh index 7dee01e..3aa5a20 100644 --- a/src/templates.sh +++ b/src/templates.sh @@ -290,7 +290,7 @@ if [[ -f "$CAC_DIR/cac-dns-guard.js" ]]; then esac case "${BUN_OPTIONS:-}" in *cac-dns-guard.js*) ;; - *) export BUN_OPTIONS="${BUN_OPTIONS:-} --preload $CAC_DIR/cac-dns-guard.js" ;; + *) export BUN_OPTIONS="${BUN_OPTIONS:-} --preload=$CAC_DIR/cac-dns-guard.js" ;; esac fi # fallback layer: HOSTALIASES (gethostbyname level) @@ -328,7 +328,7 @@ if [[ -f "$CAC_DIR/fingerprint-hook.js" ]]; then esac case "${BUN_OPTIONS:-}" in *fingerprint-hook.js*) ;; - *) export BUN_OPTIONS="--preload $CAC_DIR/fingerprint-hook.js ${BUN_OPTIONS:-}" ;; + *) export BUN_OPTIONS="--preload=$CAC_DIR/fingerprint-hook.js ${BUN_OPTIONS:-}" ;; esac fi