ngompa / rpms / PackageKit

Forked from rpms/PackageKit 4 years ago
Clone

Blame SOURCES/0001-command-not-found-Don-t-use-a-bash-regex-to-fix-othe.patch

002498
From bb5d77c89eb0f98e7a76b7cdf14cfe9e79d387fa Mon Sep 17 00:00:00 2001
002498
From: Richard Hughes <richard@hughsie.com>
002498
Date: Mon, 25 Nov 2019 11:49:06 +0000
002498
Subject: [PATCH] command-not-found: Don't use a bash regex to fix other shells
002498
002498
---
002498
 contrib/command-not-found/PackageKit.sh.in | 2 +-
002498
 1 file changed, 1 insertion(+), 1 deletion(-)
002498
002498
diff --git a/contrib/command-not-found/PackageKit.sh.in b/contrib/command-not-found/PackageKit.sh.in
002498
index ea90981f7..1e1fcdffd 100644
002498
--- a/contrib/command-not-found/PackageKit.sh.in
002498
+++ b/contrib/command-not-found/PackageKit.sh.in
002498
@@ -11,7 +11,7 @@ command_not_found_handle () {
002498
 	local retval=127
002498
 
002498
 	# only search for the command if we're interactive
002498
-	[[ $- =~ i ]] || runcnf=0
002498
+	[[ $- == *"i"* ]] || runcnf=0
002498
 
002498
 	# don't run if DBus isn't running
002498
 	[[ ! -S /run/dbus/system_bus_socket ]] && runcnf=0
002498
-- 
002498
2.23.0
002498