diff --git a/package/darwin/dfhack b/package/darwin/dfhack index 9ededf5d5..1c2c7a175 100755 --- a/package/darwin/dfhack +++ b/package/darwin/dfhack @@ -17,6 +17,12 @@ if ! test -f hack/quarantine-removed; then echo "quarantine flag removed on $(date); remove this file to re-run" > hack/quarantine-removed fi +if [ ! -t 0 ]; then + stty() { + return + } +fi + old_tty_settings=$(stty -g) DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@" stty "$old_tty_settings" diff --git a/package/linux/dfhack b/package/linux/dfhack index 18ec69cb8..b63c3a253 100755 --- a/package/linux/dfhack +++ b/package/linux/dfhack @@ -48,6 +48,12 @@ $HOME/$RC to affect future DFHack installations: EOF fi +if [ ! -t 0 ]; then + stty() { + return + } +fi + # Save current terminal settings old_tty_settings=$(stty -g)