src/Mouf/Composer/ComposerService.php
private function configureEnv() {
		if ($this->selfEdit) {
			chdir(__DIR__."/../../..");
			\putenv('COMPOSER=composer-mouf.json');
		} else {
			chdir(__DIR__."/../../../../../..");
		}
		
		$composerHome = getenv('COMPOSER_HOME');
		if (!$composerHome) {
			$composerTmpDir = sys_get_temp_dir().'/.mouf_composer/';
			if (function_exists('posix_getpwuid')) {
				$processUser = posix_getpwuid(posix_geteuid());
				$composerTmpDir .= $processUser['name'].'/';
			}
			\putenv('COMPOSER_HOME='.$composerTmpDir);
		}
		
	}
private function configureEnv() {
		if ($this->selfEdit) {
			chdir(__DIR__."/../../..");
			\putenv('COMPOSER=composer-mouf.json');
		} else {
			chdir(__DIR__."/../../../../../..");
		}
		
		$composerHome = getenv('COMPOSER_HOME');
		if (!$composerHome) {
			$composerTmpDir = sys_get_temp_dir().'/.mouf_composer/';
			if (function_exists('posix_getpwuid')) {
				$processUser = posix_getpwuid(posix_geteuid());
				$composerTmpDir .= $processUser['name'].'/';
			}
			\putenv('COMPOSER_HOME='.$composerTmpDir);
		}
		
	}
private function configureEnv ( ) { if ( $ this -> selfEdit ) { chdir ( __DIR__ . "/../../.." ) ; \ putenv ( 'COMPOSER=composer-mouf.json' ) ; } else { chdir ( __DIR__ . "/../../../../../.." ) ; } $ composerHome = getenv ( 'COMPOSER_HOME' ) ; if ( ! $ composerHome ) { $ composerTmpDir = sys_get_temp_dir ( ) . '/.mouf_composer/' ; if ( function_exists ( 'posix_getpwuid' ) ) { $ processUser = posix_getpwuid ( posix_geteuid ( ) ) ; $ composerTmpDir .= $ processUser [ 'name' ] . '/' ; } \ putenv ( 'COMPOSER_HOME=' . $ composerTmpDir ) ; } }
Changes the current working directory and set environment variables to be able to work with Composer.
Changes the current working directory and set environment variables to be able to work with Composer .