From 58b526c13b17b98de457efba88188742862847fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 2 Apr 2022 01:29:14 +0200 Subject: [PATCH] Fix strict types - bool passed to dirname --- src/Composer/Command/ConfigCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index e51ba1a7ca01..4c1747bda05a 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -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);