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 102
102
103
103
readonly keep_eol quiet target_command
104
104
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
106
106
die " command '${target_command[0]} ' not found on PATH"
107
107
fi
108
108
Original file line number Diff line number Diff line change @@ -180,10 +180,10 @@ command -v docker &>/dev/null || die 'docker command not found!'
180
180
readonly specified_run_command=${args[0]}
181
181
run_command=$specified_run_command
182
182
if [ ! -f " $specified_run_command " ]; then
183
- which " $specified_run_command " & > /dev/null ||
183
+ type -P " $specified_run_command " & > /dev/null ||
184
184
die " specified command not exists and not found in PATH: $specified_run_command "
185
185
186
- run_command=$( which " $specified_run_command " )
186
+ run_command=$( type -P " $specified_run_command " )
187
187
fi
188
188
189
189
run_command=$( realpath " $run_command " )
You can’t perform that action at this time.
0 commit comments