Skip to content

Silently exit without running the code when using the build/compile flags and 8 embedded files or more #20821

@Bacto

Description

@Bacto

What version of Bun is running?

1.2.18+0d4089ea7

What steps can reproduce the bug?

Hello,

I've hit a bug with the build/compile feature when trying to embed 8 files or more.

  1. Start the container
docker run --rm --init -it --ulimit memlock=-1:-1 oven/bun:1.2.18-alpine /bin/sh
  1. Create the app.js file and 7 empty files to be embedded
echo 'console.log("IT WORKS");' > app.js

mkdir assets
for i in $(seq 1 7); do touch assets/file-${i} ; done
  1. Build and run the binary. It works as expected.
bun build --compile app.js assets/*

./app
# IT WORKS
  1. Create an 8th file to be embedded, buid and run the binary. It fails silently (nothing is show and the exit code is 0)
touch assets/file-8

bun build --compile app.js assets/*

./app

FYI, it works as expected when building without the compile flag:

bun build --outdir=build app.js assets/* \
  && bun run build/app.js
# IT WORKS

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbundlerSomething to do with the bundler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions