File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 102102
103103readonly keep_eol quiet target_command
104104
105- if (( ${# target_command[@]} > 0 )) && ! which " ${target_command[0]} " & > /dev/null; then
105+ if (( ${# target_command[@]} > 0 )) && ! type -P " ${target_command[0]} " & > /dev/null; then
106106 die " command '${target_command[0]} ' not found on PATH"
107107fi
108108
Original file line number Diff line number Diff line change @@ -180,10 +180,10 @@ command -v docker &>/dev/null || die 'docker command not found!'
180180readonly specified_run_command=${args[0]}
181181run_command=$specified_run_command
182182if [ ! -f " $specified_run_command " ]; then
183- which " $specified_run_command " & > /dev/null ||
183+ type -P " $specified_run_command " & > /dev/null ||
184184 die " specified command not exists and not found in PATH: $specified_run_command "
185185
186- run_command=$( which " $specified_run_command " )
186+ run_command=$( type -P " $specified_run_command " )
187187fi
188188
189189run_command=$( realpath " $run_command " )
You can’t perform that action at this time.
0 commit comments