aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss5
1 files changed, 5 insertions, 0 deletions
diff --git a/kiss b/kiss
index 821b77f..9d4e877 100755
--- a/kiss
+++ b/kiss
@@ -1216,6 +1216,11 @@ args() {
die "Arguments contain invalid characters: '!*[]'"
esac
+ # Abort early if output is not a TTY and the requirement is that it
+ # be so (password prompts, user input, etc). This is a safeguard.
+ [ "${action##[bciru]*}" ] || [ -t 1 ] ||
+ die "Output not a tty"
+
# Parse some arguments earlier to remove the need to duplicate code.
case $action in
c|checksum|s|search)