Check if a binary is working by checking its exit code
The utility can be installed with Composer:
$ composer require bin-check
use Itgalaxy\BinCheck\BinCheck;
try {
$binCheck = new BinCheck('path/to/bin', ['--help']);
$binCheck->check();
} catch (\Exception $exception) {
echo $exception->message;
}
- bin-check - Thanks you for inspiration.
Feel free to push your code if you agree with publishing under the MIT license.