src/Util/RuntimeHelper.php
public static function setupHome($home)
    {
        if (empty($home)) {
            throw new \InvalidArgumentException('Empty home directory encountered.');
        }

        if (false === getenv('COMPOSER')) {
            putenv('COMPOSER=' . $home . DIRECTORY_SEPARATOR . 'composer.json');
        }
        chdir($home);

        // Ensure at least one of the environment variables is available.
        if (!getenv('COMPOSER_HOME') && !getenv('HOME')) {
            putenv('COMPOSER_HOME=' . $home);
        }
    }
public static function setupHome($home)
    {
        if (empty($home)) {
            throw new \InvalidArgumentException('Empty home directory encountered.');
        }

        if (false === getenv('COMPOSER')) {
            putenv('COMPOSER=' . $home . DIRECTORY_SEPARATOR . 'composer.json');
        }
        chdir($home);

        // Ensure at least one of the environment variables is available.
        if (!getenv('COMPOSER_HOME') && !getenv('HOME')) {
            putenv('COMPOSER_HOME=' . $home);
        }
    }
public static function setupHome ( $ home ) { if ( empty ( $ home ) ) { throw new \ InvalidArgumentException ( 'Empty home directory encountered.' ) ; } if ( false === getenv ( 'COMPOSER' ) ) { putenv ( 'COMPOSER=' . $ home . DIRECTORY_SEPARATOR . 'composer.json' ) ; } chdir ( $ home ) ; // Ensure at least one of the environment variables is available. if ( ! getenv ( 'COMPOSER_HOME' ) && ! getenv ( 'HOME' ) ) { putenv ( 'COMPOSER_HOME=' . $ home ) ; } }
Detect the correct tenside home dir and set the environment variable.

@param string $home The home directory.

@return void

@throws \InvalidArgumentException For empty value of $home.
Detect the correct tenside home dir and set the environment variable .