You are here

private function ProcessFactory::getComposerHomePath in Automatic Updates 8.2

Returns the path to use as the COMPOSER_HOME environment variable.

Return value

string The path which should be used as COMPOSER_HOME.

1 call to ProcessFactory::getComposerHomePath()
ProcessFactory::create in package_manager/src/ProcessFactory.php

File

package_manager/src/ProcessFactory.php, line 90

Class

ProcessFactory
Defines a process factory which sets the COMPOSER_HOME environment variable.

Namespace

Drupal\package_manager

Code

private function getComposerHomePath() : string {
  $home_path = $this->fileSystem
    ->getTempDirectory();
  $home_path .= '/automatic_updates_composer_home-';
  $home_path .= $this->configFactory
    ->get('system.site')
    ->get('uuid');
  $this->fileSystem
    ->prepareDirectory($home_path, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
  return $home_path;
}