protected function setEnvironmentVariable($name, $value)
    {
        $name = strtoupper($name);
        $result = putenv("$name=$value");

        if ($result === false) {
            throw new Exception\RuntimeException(
                sprintf('Failed to set environment variable "%s"', $name)
            );
        }
    }