Skip to content

Commit

Permalink
chore: Further simplify the check_tool function
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
pdcastro committed Jan 27, 2022
1 parent 70a726b commit bf6029c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ssh-uuid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,7 @@ function get_rand_port_num {
}

function check_tool {
if [ ! $(which "$1") ]; then
quit "'$1' not found in PATH. Is it installed?"
fi
which "$1" &>/dev/null || quit "'$1' not found in PATH. Is it installed?"
}

function main {
Expand Down

0 comments on commit bf6029c

Please sign in to comment.