postcss-cli
postcss-cli copied to clipboard
only exit on watch if stdin is TTY
check if stdin is TTY before checking "end" event, as non-TTY stdin will always invoke end and exit.
found from running "postcss -w" in a docker container (#370) and running "postcss -w" in lerna or turborepo.
closes #426
This causes tests to fail; please investigate.
Could be related to https://github.com/sindresorhus/get-stdin/blob/main/index.js#L4= short-circuit. Endemic to Node projects, there's no reason to be including a dependency for these 8 lines of code that come from process.stdin
.
Curious to know if this PR is dead? Running into this same issue with Rails-7 & postcss when we use foreman and background the foreman process. Thanks!
Note: the same fix here fixes that issue.
@nickcluc PR welcome that fixes this issue without breaking the test suite.
Hi @RyanZim , this is my attempt at fixing this issue: https://github.com/postcss/postcss-cli/pull/446.