From aaf9e992dace17d4241632750140678bc7a71b7e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 15 Dec 2021 15:17:38 +0100 Subject: [PATCH] run: remove residual use of 'which' command This is a follow-up commit for "Remove dependency from 'which' utility". Thanks to John Karcher for reporting. Fixes #4319 --- tool/run/run | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tool/run/run b/tool/run/run index 8b24bba6a6..50877de450 100755 --- a/tool/run/run +++ b/tool/run/run @@ -547,9 +547,10 @@ proc have_installed {program} { # \return absolute path of command if found, or exists if not # proc installed_command {command} { - if { [catch {set path [exec which $command]}] == 0} { - return $path - } + + set path [auto_execok $command] + if {$path != ""} { + return $path } set dir { /sbin /usr/sbin /usr/local/bin }