public function putEnv($destination, array $dependencies)
    {
        $env = [];
        $paths = [];
        foreach ($dependencies as $stack => $stackDependencies) {
            $manager = $this->getManager($stack);
            $path = $destination . '/' . $stack;
            $paths = array_merge($paths, $manager->getBinPaths($path));
            $env = array_merge($env, $manager->getEnvVars($path));
        }
        $paths = array_filter(array_map('realpath', $paths));
        if (!empty($paths)) {
            $pathVariable = OsUtil::isWindows() ? 'Path' : 'PATH';
            $env[$pathVariable] = implode(':', $paths);
            if (getenv($pathVariable)) {
                $env[$pathVariable] .= ':' . getenv($pathVariable);
            }
        }
        foreach ($env as $name => $value) {
            putenv($name . '=' . $value);
        }
    }
public function putEnv($destination, array $dependencies)
    {
        $env = [];
        $paths = [];
        foreach ($dependencies as $stack => $stackDependencies) {
            $manager = $this->getManager($stack);
            $path = $destination . '/' . $stack;
            $paths = array_merge($paths, $manager->getBinPaths($path));
            $env = array_merge($env, $manager->getEnvVars($path));
        }
        $paths = array_filter(array_map('realpath', $paths));
        if (!empty($paths)) {
            $pathVariable = OsUtil::isWindows() ? 'Path' : 'PATH';
            $env[$pathVariable] = implode(':', $paths);
            if (getenv($pathVariable)) {
                $env[$pathVariable] .= ':' . getenv($pathVariable);
            }
        }
        foreach ($env as $name => $value) {
            putenv($name . '=' . $value);
        }
    }
public function putEnv ( $ destination , array $ dependencies ) { $ env = [ ] ; $ paths = [ ] ; foreach ( $ dependencies as $ stack => $ stackDependencies ) { $ manager = $ this -> getManager ( $ stack ) ; $ path = $ destination . '/' . $ stack ; $ paths = array_merge ( $ paths , $ manager -> getBinPaths ( $ path ) ) ; $ env = array_merge ( $ env , $ manager -> getEnvVars ( $ path ) ) ; } $ paths = array_filter ( array_map ( 'realpath' , $ paths ) ) ; if ( ! empty ( $ paths ) ) { $ pathVariable = OsUtil :: isWindows ( ) ? 'Path' : 'PATH' ; $ env [ $ pathVariable ] = implode ( ':' , $ paths ) ; if ( getenv ( $ pathVariable ) ) { $ env [ $ pathVariable ] .= ':' . getenv ( $ pathVariable ) ; } } foreach ( $ env as $ name => $ value ) { putenv ( $ name . '=' . $ value ) ; } }
Modify the environment to make the installed dependencies available.

@param string $destination
@param array  $dependencies
Modify the environment to make the installed dependencies available .