If true, stdout and stderr pipes will not automatically start reading data. Reading will only begin when you access the stdout or stderr properties.
This can improve performance when you don't need to read output immediately.
property
If true, stdout and stderr pipes will not automatically start reading data. Reading will only begin when you access the stdout or stderr properties.
This can improve performance when you don't need to read output immediately.
const subprocess = Bun.spawn({
cmd: ["echo", "hello"],
lazy: true, // Don't start reading stdout until accessed
});
// stdout reading hasn't started yet
await subprocess.stdout.text(); // Now reading starts