#How to disable bun preload?
1 messages · Page 1 of 1 (latest)
i don't think there is a built in flag but to make this only load once try passing an environment variable like HAS_LOADED_THING=1
cool idea but even if i pass an empty object in env from Bun.spawn, i get /usr/bin/env: 'bun': No such file or directory
and bun is there in path
@oblique crown new bug found
🙂
preload.ts
console.log(Bun.argv[2], Object.keys(process.env).length);
Bun.spawnSync(["bun", ".", "--second"], { stdout: "inherit", env: {} });
apparently env wipes out whole env when spawn
is it intended?
intentional, you have to pass path always or else the subprocess wont know how to find the path
i meant passing an extra env var to signify it was already loaded