|
|
|
@ -159,18 +159,16 @@ EOT
|
|
|
|
|
$this->authConfigSource = new JsonConfigSource($this->authConfigFile, true);
|
|
|
|
|
|
|
|
|
|
// Initialize the global file if it's not there, ignoring any warnings or notices
|
|
|
|
|
Silencer::suppress();
|
|
|
|
|
if ($input->getOption('global') && !$this->configFile->exists()) {
|
|
|
|
|
touch($this->configFile->getPath());
|
|
|
|
|
$this->configFile->write(array('config' => new \ArrayObject));
|
|
|
|
|
chmod($this->configFile->getPath(), 0600);
|
|
|
|
|
Silencer::call('chmod', $this->configFile->getPath(), 0600);
|
|
|
|
|
}
|
|
|
|
|
if ($input->getOption('global') && !$this->authConfigFile->exists()) {
|
|
|
|
|
touch($this->authConfigFile->getPath());
|
|
|
|
|
$this->authConfigFile->write(array('http-basic' => new \ArrayObject, 'github-oauth' => new \ArrayObject, 'gitlab-oauth' => new \ArrayObject));
|
|
|
|
|
chmod($this->authConfigFile->getPath(), 0600);
|
|
|
|
|
Silencer::call('chmod', $this->authConfigFile->getPath(), 0600);
|
|
|
|
|
}
|
|
|
|
|
Silencer::restore();
|
|
|
|
|
|
|
|
|
|
if (!$this->configFile->exists()) {
|
|
|
|
|
throw new \RuntimeException(sprintf('File "%s" cannot be found in the current directory', $configFile));
|
|
|
|
|