diff --git a/src/Drupal/Commands/core/DeployHookCommands.php b/src/Drupal/Commands/core/DeployHookCommands.php index 5517698de8..3e387439f9 100644 --- a/src/Drupal/Commands/core/DeployHookCommands.php +++ b/src/Drupal/Commands/core/DeployHookCommands.php @@ -204,7 +204,9 @@ public static function updateDoOneDeployHook(string $function, DrushBatchContext Drush::logger()->error($e->getMessage()); $variables = Error::decodeException($e); - unset($variables['backtrace']); + $variables = array_filter($variables, function ($key) { + return $key[0] == '@' || $key[0] == '%'; + }, ARRAY_FILTER_USE_KEY); // On windows there is a problem with json encoding a string with backslashes. $variables['%file'] = strtr($variables['%file'], [DIRECTORY_SEPARATOR => '/']); $ret['#abort'] = [