Symptom: You have a script that fails while executing a
composer require command, resulting in output like the following:
$ ./example.sh Gathering patches for root package. Removing package drupal/core so that it can be re-installed and re-patched. - Removing drupal/core (8.6.x-dev) In VcsDownloader.php line 242: Source directory docroot/core has uncommitted changes.
Attempting to execute the offending
composer require command manually results in output like the following:
$ composer require drupal/examples Gathering patches for root package. Removing package drupal/core so that it can be re-installed and re-patched. - Removing drupal/core (8.6.x-dev) The package has modified files: M core.services.yml M includes/install.core.inc M includes/install.inc M lib/Drupal/Core/Config/ConfigInstaller.php M lib/Drupal/Core/Config/ExtensionInstallStorage.php M lib/Drupal/Core/Config/InstallStorage.php M lib/Drupal/Core/Entity/EntityViewBuilder.php M lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php M lib/Drupal/Core/Extension/ExtensionDiscovery.php M lib/Drupal/Core/Extension/ModuleExtensionList.php 19 more files modified, choose "v" to view the full list Discard changes [y,n,v,d,?]?
Conditions: You are using Composer to manage your Drupal site dependencies and applying patches with
cweagans/composer-patches. You may be using Acquia BLT.