Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit a9ed96d

Browse files
committed
Changed check command exists to only return a boolean
1 parent 62de742 commit a9ed96d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/System/UnixSystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function checkIfCommandExists($cmdName)
4747
"if command -v ".$cmdName." >/dev/null 2>&1; then echo \"true\"; else echo \"false\"; fi;"
4848
);
4949

50-
return filter_var($sysResponse, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
50+
return filter_var($sysResponse, FILTER_VALIDATE_BOOLEAN);
5151
}
5252

5353
/** @return string|null */

src/System/WindowsSystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function checkIfCommandExists($cmdName)
4545

4646
$sysResponse = exec("where $cmdName > nul 2>&1 && echo true");
4747

48-
return filter_var($sysResponse, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
48+
return filter_var($sysResponse, FILTER_VALIDATE_BOOLEAN);
4949
}
5050

5151
/** @return string */

0 commit comments

Comments
 (0)