I'm behind a proxy and the self-update command breaks because it does not take my proxy environment variables into consideration when checking github for the latest release in this file:
Specifically I'm getting this error when trying to self-update Acquia CLI:
PHP Warning: file_get_contents(https://api.github.com/repos/acquia/cli/releases): failed to open stream: Connection refused
in phar:///usr/local/bin/acli/vendor/consolidation/self-update/src/SelfUpdateCommand.php on line 70
Warning: file_get_contents(https://api.github.com/repos/acquia/cli/releases): failed to open stream: Connection refused in phar:///usr/local/bin/acli/vendor/consolidation/self-update/src/SelfUpdateCommand.php on line 70
In SelfUpdateCommand.php line 74:
API error - no release found at GitHub repository acquia/cli
self:update [--stable] [--preview]
I think something needs to be added to check for proxy settings and apply them to the stream context, if necessary, but I'm not quite sure how to access proxy settings in this script:
$opts = [
'http' => [
'method' => 'GET',
'proxy' => $proxy_environment_variable,
'header' => [
'User-Agent: ' . $this->applicationName . ' (' . $this->gitHubRepository . ')' . ' Self-Update (PHP)'
]
]
];
I'm behind a proxy and the
self-updatecommand breaks because it does not take my proxy environment variables into consideration when checking github for the latest release in this file:self-update/src/SelfUpdateCommand.php
Line 55 in ed68ed6
Specifically I'm getting this error when trying to
self-updateAcquia CLI:I think something needs to be added to check for proxy settings and apply them to the stream context, if necessary, but I'm not quite sure how to access proxy settings in this script: