Skip to content

Commit

Permalink
[console] Write temp files using stream_wrapper.temporary. Fixes #3481 (
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Aug 31, 2017
1 parent cc2e3db commit de73d34
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Utils/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit de73d34

Please sign in to comment.