Skip to content

Commit 3f0ad10

Browse files
committed
fix: command checks
1 parent 849d654 commit 3f0ad10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/ctl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ done
215215

216216
if [[ 0 -eq "${#services[@]}" ]]; then
217217
# MacOSX patch, as long as it does not compatible with linux's grep -P
218-
if [[ -x perl ]]; then
218+
if command -v perl >/dev/null 2>&1; then
219219
service_entries=()
220220

221221
while IFS= read -r -d '' file; do

bin/updep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ done
6868

6969
# load services from path if they were not provided by command-line option
7070
if [[ 0 -eq "${#services[@]}" ]]; then
71-
if [[ -x perl ]]; then
71+
if command -v perl >/dev/null 2>&1; then
7272
service_entries=()
7373

7474
while IFS= read -r -d '' file; do

0 commit comments

Comments
 (0)