Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
junon
· 1y ago · 0 comments
If prompt is the default, mistyped scripts will hang rather than exit 1 if they have stdin open. I think that causes more problems than it solves.
Comments
[–]
jzwinck
1y ago
That's what isatty() is for. If stdin is not a TTY, prompting should not be the default. Many programs change their defaults or their entire behavior based on isatty().
[–]
junon
OP
1y ago
isatty() is spoofed in e.g. Make via PTYs. It's a light check at best and lies to you at worst.
[–]
darthwalsh
1y ago
If make is going to spoof the PTY, it should take responsibility for answering the autocorrect prompt
[–]
junon
OP
1y ago
There's no "prompt". That's not how TTYs work. Make has no idea the program is waiting for any input.