Add bash strict mode to lib/commands/which.sh

This commit is contained in:
Trevor Brown 2019-05-11 17:22:34 -04:00
parent 00186a8420
commit b1ec17870a

View File

@ -1,6 +1,9 @@
set -o nounset -o pipefail -o errexit
IFS=$'\t\n' # Stricter IFS settings
which_command() { which_command() {
local shim_name local shim_name
shim_name=$(basename "$1") shim_name=$(basename "${1:-}")
if [ -z "$shim_name" ]; then if [ -z "$shim_name" ]; then
echo "usage: asdf which <command>" echo "usage: asdf which <command>"