Skip to content

Commit 8ae1d26

Browse files
committed
Merge branch 'v2.0.0' of https://github.com/Hdoc1509/shell-fns into v2.0.0
2 parents d9b7451 + cd00499 commit 8ae1d26

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

main.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ else
2121
done
2222
fi
2323

24-
(("${#SF_WARNS[@]}" > 0)) && __sf_show_warns
24+
[[ "${#SF_WARNS[@]}" -gt 0 ]] && __sf_show_warns

utils.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ source_files_in() {
1717

1818
is_bin_in_path() {
1919
if [[ -n "$ZSH_VERSION" ]]; then
20-
builtin whence -p "$1" &>/dev/null
20+
builtin whence -p "$1" &>/dev/null ||
21+
builtin command -v "$1" &>/dev/null
2122
else # bash
22-
builtin type -P "$1" &>/dev/null
23+
builtin type -P "$1" &>/dev/null ||
24+
builtin command -v "$1" &>/dev/null
2325
fi
2426
}
2527

0 commit comments

Comments
 (0)