cookbooks/tvdinner/files/default/jasonx/_sub in tvd-tvdinner-0.0.13 vs cookbooks/tvdinner/files/default/jasonx/_sub in tvd-tvdinner-0.0.14

- old
+ new

@@ -28,12 +28,13 @@ eval set -- "${FLAGS_ARGV}" fi if [[ "$#" > 0 ]]; then if [[ ! "$1" =~ ^- ]]; then - local sub_cmd="$(command -v "${sub_base}-$1" || true)" + local sub_cmd="$shome/libexec/${sub_base}-$1" + if [[ ! -x "$sub_cmd" ]]; then - sub_cmd="$shome/libexec/${sub_base}-$1" + sub_cmd="$(type -P "${sub_base}-$1" || true)" fi if [[ -x "$sub_cmd" ]]; then shift exec "$sub_cmd" "$@"