diff --git a/drupalmoduleupgrader.drush.inc b/drupalmoduleupgrader.drush.inc
index 293eb5f..a90ca22 100644
--- a/drupalmoduleupgrader.drush.inc
+++ b/drupalmoduleupgrader.drush.inc
@@ -264,7 +264,8 @@ function drush_drupalmoduleupgrader_dmu_analyze($module) {
     ];
 
     $destination = drush_get_option('output', $target->getPath('upgrade-info.html'));
-    file_put_contents($destination, render($render));
+    $output = \Drupal::service('renderer')->renderRoot($render);
+    file_put_contents($destination, $output);
     drush_log(\Drupal::translation()->translate('Generated a report at @path', ['@path' => $destination]), 'success');
   }
   else {
