ngompa / rpms / PackageKit

Forked from rpms/PackageKit 3 years ago
Clone

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

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