oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.18k stars 2.77k forks source link

Bun x can't detect interactive input when running with docker #4793

Open neuralstring opened 1 year ago

neuralstring commented 1 year ago

What version of Bun is running?

1.0.0

What platform is your computer?

Linux 6.4.11 x86_64 | Docker version 24.0.5, build ced0996600

What steps can reproduce the bug?

$ docker run -it --rm --init --ulimit memlock=-1:-1 oven/bun x create-vite sandbox
✔ Select a framework: › React
? Select a variant: › - Use arrow-keys. Return to submit.
❯   TypeScript
    TypeScript + SWC
    JavaScript
    JavaScript + SWC

What is the expected behavior?

Selecting option using arrow-keys and pressing enter to submit.

What do you see instead?

Only first interaction will work, After pressing Enter no key will work. not even Ctrl+C/Ctrl+Z.

Additional information

Tested on tty & konsole

eslym commented 1 year ago

same as WSL, tried in both wsl1 and wsl2 image

tested in: WSL2 Version: 5.15.90.1-microsoft-standard-WSL2 WSL1 Version: 4.4.0-19041-Microsoft

Update Somehow everything works fine once nodejs was installed, tested in WSL and docker container. I think this behaviour need to be tested in a actual linux environment without nodejs present

Show Screenshot ![image](https://github.com/oven-sh/bun/assets/3667594/8332ced2-cd3c-4699-8531-ca69ab14fccd)

and it happens again once i uninstalled nodejs

Show Screenshot ![image](https://github.com/oven-sh/bun/assets/3667594/b88a7a84-6594-4470-a737-359fad185a45)

even with nodejs present, bun --bun x will still have the same issue present, so prettty much confirm this is a bug in bun runtime