Very strange, patches hosted on Drupal.org can be applied by composer with no problems, but a patch from a local directory on my Windows system failed.
I used Winmerge to produce a patchfile, included it in composer.json and the result was always "could not apply patch"
composer -v update
produced the result "patch is not a recognized internal or external command"
that prompted me to search for that error, and apparently it only happens on Windows. the solution was to add the path containing the patch command in my GIT installation to the environment variables.
just type "envir" in Windows search, then click on "Edit the system environment variables", in the tab "advanced" click on "environment variables".
search on your system for the GIT installation, usually it's C:\Program Files\Git
and then add C:\Program Files\Git\usr\bin to the list of system paths.
then close and re-open your command shell window.
some also recommend adding C:\Program Files\Git\bin and C:\Program Files\Git\cmd
I didn't do that, but the patch worked anyway after I added just the first path.
- Log in to post comments
Comments