]> git.saurik.com Git - apt.git/commitdiff
apt-key: don't search PATH if command is a path already
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 14 Jun 2016 11:55:33 +0000 (13:55 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Tue, 14 Jun 2016 11:55:33 +0000 (13:55 +0200)
cmdline/apt-key.in

index ede6be4c3279fdec2304c40d0d2623554a936d1e..7c12c72a309332fd40cc03ef9ff63581351f2217 100644 (file)
@@ -23,6 +23,7 @@ requires_root() {
 }
 
 command_available() {
+    if [ -x "$1" ]; then return 0; fi
     # command -v "$1" >/dev/null 2>&1 # not required by policy, see #747320
     # which "$1" >/dev/null 2>&1 # is in debianutils (essential) but not on non-debian systems
     local OLDIFS="$IFS"