From 825024f0dc387ee6f1eb108a41b6abfb500f26b5 Mon Sep 17 00:00:00 2001 From: David Burns Date: Tue, 23 Jul 2024 21:32:59 -0400 Subject: [PATCH] Issue #616 - Fix Pantheon deploy error (#622) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Issue #616 - Fix Pantheon deploy error This patch has been tested on multiple projects and does complete the deployment without failure * Update tasks/drupal.yml Co-authored-by: Christian López Espínola --------- Co-authored-by: Christian López Espínola --- tasks/drupal.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/drupal.yml b/tasks/drupal.yml index f06038ce..2aedd941 100644 --- a/tasks/drupal.yml +++ b/tasks/drupal.yml @@ -68,7 +68,10 @@ tasks: - ./vendor/bin/drush {{.site}} --yes cache:rebuild - ./vendor/bin/drush {{.site}} --yes deploy:hook - | - if [[ $(./vendor/bin/drush {{.site}} config:status --format=json --state=Different) != '[]' ]]; then + # drush config:status --format=json is outputting notices in Pantheon even with the json format, + # so we need to tail the last line. + config_status_output=$(./vendor/bin/drush {{.site}} config:status --format=json --state=Different | tail -n1) + if [[ $config_status_output != '[]' ]]; then echo "Config export does not match database." ./vendor/bin/drush {{.site}} config:status exit 1;