Open michaelpj opened 4 years ago
Which distros, and where is it located if not /bin/stty
? The /bin/stty
path has been hard-coded due to https://github.com/rschmitt/heatseeker/issues/41.
NixOS in particular. It's on the PATH
, but not in /bin
. I realise this is slightly weird, but that's portability for you...
Oh I see, you specifically don't want to take it from the user's PATH. I can't really say anything to that except that I think that's quite fragile. If you need certain things to be installed and on the path then that's fine, and users need to get that right. Assuming you can get it from somewhere else seems risky (and does not work for me).
I may prefer /usr/bin/env
to hardcoding /bin/stty
now that I know that the latter isn't necessarily portable. I may also try both strategies.
To be clear, /usr/bin/env
will do a PATH
lookup, so the user in #41 would have the same problem due to having the wrong stty
on their PATH
.
Some distros don't necessarily have
stty
at/bin/stty
, but/usr/bin/env
is slightly more standardized.(I'd offer a patch but I'm currently a total Rust illiterate .)