From de73d34f3f6c2d1d588f565158e84dc38c79e6a6 Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Thu, 31 Aug 2017 00:22:43 -0700 Subject: [PATCH] [console] Write temp files using stream_wrapper.temporary. Fixes #3481 (#3493) --- src/Utils/Site.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Utils/Site.php b/src/Utils/Site.php index 748acd079..86db36f20 100644 --- a/src/Utils/Site.php +++ b/src/Utils/Site.php @@ -206,10 +206,14 @@ public function getCachedServicesFile() { if (!$this->cacheServicesFile) { $configFactory = \Drupal::configFactory(); - $siteId = $configFactory->get('system.site')->get('uuid'); + $siteId = $configFactory->get('system.site') + ->get('uuid'); - $this->cacheServicesFile = \Drupal::service('console.root') . - DRUPAL_CONSOLE . $siteId . '-console.services.yml'; + $directory = \Drupal::service('stream_wrapper.temporary') + ->getDirectoryPath(); + + $this->cacheServicesFile = $directory . '/' . $siteId . + '-console.services.yml'; } return $this->cacheServicesFile;