Skip to content

Commit

Permalink
Fix strict types - bool passed to dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Apr 2, 2022
1 parent 95e09d3 commit 58b526c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Command/ConfigCommand.php
Expand Up @@ -185,7 +185,7 @@ protected function initialize(InputInterface $input, OutputInterface $output)

$authConfigFile = $input->getOption('global')
? ($this->config->get('home') . '/auth.json')
: dirname(realpath($configFile)) . '/auth.json';
: dirname(realpath($configFile) !== false ? realpath($configFile) : '') . '/auth.json';

$this->authConfigFile = new JsonFile($authConfigFile, null, $io);
$this->authConfigSource = new JsonConfigSource($this->authConfigFile, true);
Expand Down

0 comments on commit 58b526c

Please sign in to comment.