`composer require` fails because “Source directory docroot/core has uncommitted changes”
5
2
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/Dr