From 7aa647da6f21f9791ee561eff5267877660f3ac2 Mon Sep 17 00:00:00 2001 From: George Dumitrescu Date: Fri, 25 Sep 2026 17:26:48 +0300 Subject: [PATCH] fix: offer Drupal's Import config only when there is config to import A fresh Drupal has no exported configuration, and drush refuses to import an empty sync directory because it would delete the site's configuration. lerd setup --all runs every setup step, so it aborted on every new Drupal project right after the installer had succeeded. The step is now offered only once config/sync holds an exported site, in the Drupal definitions and in the drush package alike. --- frameworks/drupal/10.yaml | 4 +++- frameworks/drupal/11.yaml | 4 +++- frameworks/drupal/8.yaml | 4 +++- frameworks/drupal/9.yaml | 4 +++- packages/drush-drush.yaml | 4 ++++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/frameworks/drupal/10.yaml b/frameworks/drupal/10.yaml index 88a00d2..c1b873a 100644 --- a/frameworks/drupal/10.yaml +++ b/frameworks/drupal/10.yaml @@ -95,8 +95,10 @@ setup: composer: drush/drush - label: Import config command: php vendor/drush/drush/drush.php config:import --yes + # A fresh install has no exported config, and importing an empty sync + # directory is refused because it would delete the site's configuration. check: - composer: drush/drush + file: config/sync/system.site.yml tinker: command: ["vendor/drush/drush/drush.php", "php:eval"] diff --git a/frameworks/drupal/11.yaml b/frameworks/drupal/11.yaml index 97a8ae5..e9563bc 100644 --- a/frameworks/drupal/11.yaml +++ b/frameworks/drupal/11.yaml @@ -95,8 +95,10 @@ setup: composer: drush/drush - label: Import config command: php vendor/drush/drush/drush.php config:import --yes + # A fresh install has no exported config, and importing an empty sync + # directory is refused because it would delete the site's configuration. check: - composer: drush/drush + file: config/sync/system.site.yml tinker: command: ["vendor/drush/drush/drush.php", "php:eval"] diff --git a/frameworks/drupal/8.yaml b/frameworks/drupal/8.yaml index d3733e3..db541f2 100644 --- a/frameworks/drupal/8.yaml +++ b/frameworks/drupal/8.yaml @@ -87,8 +87,10 @@ setup: composer: drush/drush - label: Import config command: php vendor/drush/drush/drush.php config:import --yes + # A fresh install has no exported config, and importing an empty sync + # directory is refused because it would delete the site's configuration. check: - composer: drush/drush + file: config/sync/system.site.yml tinker: command: ["vendor/drush/drush/drush.php", "php:eval"] diff --git a/frameworks/drupal/9.yaml b/frameworks/drupal/9.yaml index 67a1451..de11a7c 100644 --- a/frameworks/drupal/9.yaml +++ b/frameworks/drupal/9.yaml @@ -91,8 +91,10 @@ setup: composer: drush/drush - label: Import config command: php vendor/drush/drush/drush.php config:import --yes + # A fresh install has no exported config, and importing an empty sync + # directory is refused because it would delete the site's configuration. check: - composer: drush/drush + file: config/sync/system.site.yml tinker: command: ["vendor/drush/drush/drush.php", "php:eval"] diff --git a/packages/drush-drush.yaml b/packages/drush-drush.yaml index 6535b73..f8a658c 100644 --- a/packages/drush-drush.yaml +++ b/packages/drush-drush.yaml @@ -72,3 +72,7 @@ setup: default: true - label: Import config command: php vendor/drush/drush/drush.php config:import --yes + # A fresh install has no exported config, and importing an empty sync + # directory is refused because it would delete the site's configuration. + check: + file: config/sync/system.site.yml