在 Windows 上安装 Composer 时停止打补丁

问题描述

有谁知道为什么在“composer install”时会出现这种情况? 以及如何解决这个问题?

C:\Users\1337\Desktop\wafasalaf>composer install
Gathering patches from patch file.
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies (including require-dev)
Package operations: 152 installs,0 updates,0 removals
Gathering patches from patch file.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/core (8.9.16): Loading from cache
  - Applying patches for drupal/core
    modules/patches/block-remove-logger-warning.patch (Remove not found blocks warning.)
   Could not apply patch! Skipping. The error was: Cannot apply patch modules/patches/block-remove-logger-warning.patch


  [Exception]
  Cannot apply patch Remove not found blocks warning. (modules/patches/block-remove-logger-warning.patch)!


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

解决方法

这已解决,我在无法识别补丁的 Windows 上遇到问题。

我所要做的就是将 patch.exe 的路径链接放在我的系统环境中(如果您有适用于 Windows 的 git,它已经安装并且您将在“C:\Program Files\Git\usr\”中找到它垃圾箱”)。