Try to lookup commands by $PATH before iterating over hardcoded paths.
To my surprise, gp_bash_functions.sh finds available commands by
iterating over hardcoded paths. This patch helps teach the script
find commands by using the `which` command.
@@ -37,6 +37,11 @@ GP_UNIQUE_COMMAND=gpstart
findCmdInPath() {
cmdtofind=$1
+ CMD=`which $cmdtofind`
+ if [ $? -eq 0 ]; then
+ echo $CMD
+ return
+ fi
for pathel in ${CMDPATH[@]}
do
CMD=$pathel/$cmdtofind
