This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
abrt-addon-python3/0071-console-notifications-skip-non-interactive-shells.patch
Matej Habrnal 69165ba9cc Introduce abrt-addon-python3 package
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
2017-07-04 09:22:28 +02:00

30 lines
968 B
Diff

From bbd1e3c8765a8e28d4ade94eff60640c140b436a Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Sat, 11 Oct 2014 00:05:07 +0200
Subject: [ABRT PATCH 71/71] console-notifications: skip non-interactive shells
Related to rhbz#1141485
Related to rhbz#1139001
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/cli/abrt-console-notification.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
index 38de7bb..976dfc3 100755
--- a/src/cli/abrt-console-notification.sh
+++ b/src/cli/abrt-console-notification.sh
@@ -3,6 +3,9 @@
# terminal.
tty -s || return 0
+# Skip all for noninteractive shells for the same reason as above.
+[ -z "$PS1" ] && return 0
+
# If $HOME is not set, a non human user is logging in to shell but this script
# should provide information to human users, therefore returning immediately
# without showing the notification.
--
1.8.3.1