From a0ab005ceedf2a98f7130b973849f603523b6788 Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:46:04 +0100 Subject: [PATCH] remove redundat directory separator which caused "//" in path not found errors --- src/Psalm/Config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 82c696c0bcd..295f0a41c78 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -787,7 +787,7 @@ public static function loadFromXMLFile(string $file_path, string $current_dir): { $file_contents = file_get_contents($file_path); - $base_dir = dirname($file_path) . DIRECTORY_SEPARATOR; + $base_dir = dirname($file_path); if ($file_contents === false) { throw new InvalidArgumentException('Cannot open ' . $file_path); @@ -1304,7 +1304,7 @@ private static function fromXmlAndPaths( // ProjectAnalyzer::getInstance()->check_paths_files is not populated at this point in time $paths_to_check = null; - + global $argv; // Hack for Symfonys own argv resolution. @@ -1312,7 +1312,7 @@ private static function fromXmlAndPaths( if (!isset($argv[0]) || basename($argv[0]) !== 'psalm-plugin') { $paths_to_check = CliUtils::getPathsToCheck(null); } - + if ($paths_to_check !== null) { $paths_to_add_to_project_files = array(); foreach ($paths_to_check as $path) {