Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun Shell doesn't keep parent Bun process alive #13713

Closed
ottomated opened this issue Sep 3, 2024 · 1 comment
Closed

Bun Shell doesn't keep parent Bun process alive #13713

ottomated opened this issue Sep 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working shell Something to do with Bun as a shell

Comments

@ottomated
Copy link

ottomated commented Sep 3, 2024

What version of Bun is running?

1.1.26+0a37423ba

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

// Silently fails
async function main() {
  await Bun.$`bun --version`.quiet();
  console.log('Hello World');
}
main();

// Works
async function main() {
  await Bun.$`bun --version`.quiet();
  console.log('Hello World');
}
await main();

// Works
async function main() {
  await Bun.$`bun --version`;
  console.log('Hello World');
}
main();

// Works
async function main() {
  await Bun.$`echo hi`.quiet();
  console.log('Hello World');
}
main();

What is the expected behavior?

The first example above should print "Hello World"

What do you see instead?

It exits silently

Additional information

Probably something to do with spawning processes?

@ottomated ottomated added bug Something isn't working needs triage labels Sep 3, 2024
@Jarred-Sumner Jarred-Sumner added shell Something to do with Bun as a shell and removed needs triage labels Sep 3, 2024
@Jarred-Sumner Jarred-Sumner changed the title Quiet shell executions don't work with dangling promises Bun Shell doesn't keep parent Bun process alive Sep 6, 2024
@Jarred-Sumner
Copy link
Collaborator

Fixed in Bun v1.1.27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working shell Something to do with Bun as a shell
Projects
None yet
Development

No branches or pull requests

3 participants