mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): disable .env autoload in standalone binary
Bun compiled executables load cwd .env files into process.env by default. closes #10473
This commit is contained in:
parent
9ad083102a
commit
1ffb6bd621
3 changed files with 6 additions and 4 deletions
|
|
@ -127,11 +127,12 @@ for platform in "${PLATFORMS[@]}"; do
|
|||
# for the worker specifiers in the runtime to resolve.
|
||||
#
|
||||
# Disable cwd bunfig.toml autoload so project preload scripts cannot crash the
|
||||
# standalone binary before pi starts (see #7684).
|
||||
# standalone binary before pi starts (see #7684). Disable cwd .env autoload so
|
||||
# project env files do not leak into pi's environment (see #10473).
|
||||
if [[ "$platform" == windows-* ]]; then
|
||||
bun build --compile --no-compile-autoload-bunfig --target="$bun_target" ./dist/bun/cli.js ./src/utils/image-resize-worker.ts ./src/extensions/codemode/worker.ts --outfile "$OUTPUT_DIR/$platform/pi.exe"
|
||||
bun build --compile --no-compile-autoload-bunfig --no-compile-autoload-dotenv --target="$bun_target" ./dist/bun/cli.js ./src/utils/image-resize-worker.ts ./src/extensions/codemode/worker.ts --outfile "$OUTPUT_DIR/$platform/pi.exe"
|
||||
else
|
||||
bun build --compile --no-compile-autoload-bunfig --target="$bun_target" ./dist/bun/cli.js ./src/utils/image-resize-worker.ts ./src/extensions/codemode/worker.ts --outfile "$OUTPUT_DIR/$platform/pi"
|
||||
bun build --compile --no-compile-autoload-bunfig --no-compile-autoload-dotenv --target="$bun_target" ./dist/bun/cli.js ./src/utils/image-resize-worker.ts ./src/extensions/codemode/worker.ts --outfile "$OUTPUT_DIR/$platform/pi"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue