Skip to content

Commit

Permalink
Throw an exception if 'patch' command not found
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Feb 2, 2023
1 parent 894ea91 commit 26dfeb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Plugin/Patches.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ protected function getAndApplyPatch(HttpDownloader $downloader, $install_path, $
// In some rare cases, git will fail to apply a patch, fallback to using
// the 'patch' command.
if (!$patched) {
if (! $this->executeCommand('command -v patch')) {
throw new Exception('Cannot find "patch" command; unable to apply patches');
}

// This is a workaround for the outdated patch version on BSD
// systems which doesn't support this option -> use posix then.
// --no-backup-if-mismatch here is a hack that fixes some
Expand Down

0 comments on commit 26dfeb8

Please sign in to comment.