Netresearch\Composer\Patches\Patch::whichPatchCmd PHP Method

whichPatchCmd() protected method

Locate the patch executable
protected whichPatchCmd ( ) : string
return string
    protected function whichPatchCmd()
    {
        static $patchCommand = null;
        if (!$patchCommand) {
            $exitCode = $output = null;
            $patchCommand = exec('which patch', $output, $exitCode);
            if (0 !== $exitCode || !is_executable($patchCommand)) {
                throw new Exception("Cannot find the 'patch' executable command - use your o/s package manager like 'sudo yum install patch'");
            }
        }
        return $patchCommand;
    }