From 786e19998660746cfc3fc032eebf13dcfa7f7da7 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Tue, 8 Oct 2024 11:01:48 -0700 Subject: [PATCH] Revising existence and executable tests for apex_exec --- src/scripts/apex_exec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/scripts/apex_exec b/src/scripts/apex_exec index 91ab00e4..01e3fadc 100755 --- a/src/scripts/apex_exec +++ b/src/scripts/apex_exec @@ -678,12 +678,13 @@ else APEX_LDD=ldd fi -if [ ! -x "${prog}" ] ; then - prog=`which ${prog} 2>/dev/null` +if [ ! -e "${prog}" ] ; then + echo "apex_exec: ${prog}: file does not exist" + exit fi -if [ ! -x "${prog}" ] ; then - echo "apex_exec: $1: command not found" +if [ ! -x "${prog}" ] && [ ${python} = no ] ; then + echo "apex_exec: ${prog}: command not an executable file" exit fi