Exit 2 immediately on netbsd for now because script is broken for our
purposes (was hanging) due to
https://gnats.netbsd.org/56254
Thanks to Greg Troxel for finding and reporting the problem.
Signed-off-by: Rob Browning <
r...@defaultvalue.org>
Tested-by: Rob Browning <
r...@defaultvalue.org>
---
dev/with-tty | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dev/with-tty b/dev/with-tty
index c65aa1d4..7f3de35f 100755
--- a/dev/with-tty
+++ b/dev/with-tty
@@ -7,11 +7,15 @@ set -ueo pipefail
usage() { echo 'Usage: with-tty command [arg ...]'; }
misuse() { usage 1>&2; exit 2; }
+case "$OSTYPE" in
+ netbsd) exit 2 ;; #
https://gnats.netbsd.org/56254
+esac
+
if script -qec true /dev/null; then
- # linux flavor
+ # at least linux and netbsd
script -qec "$(printf ' %q' "$@")" /dev/null
elif script -q /dev/null true; then
- # bsd flavor
+ # at least freebsd
script -q /dev/null "$@"
else
rc=0
--
2.47.3