Skip to content

Commit

Permalink
Fix $config(Dir|File)
Browse files Browse the repository at this point in the history
  • Loading branch information
d3y4n committed Apr 24, 2014
1 parent c841aff commit 86a0f41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Symfony/CS/Console/Command/FixCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@ protected function execute(InputInterface $input, OutputInterface $output)

$configFile = $input->getOption('config-file');
if (null === $configFile) {
$configDir = $path ?: getcwd();
if (is_file($path) && $dirName = pathinfo($path, PATHINFO_DIRNAME)) {
$configDir = $dirName;
} elseif ($stdin) {
$configDir = getcwd();
// path is directory
} else {
$configDir = $path;
}
$configFile = $configDir . DIRECTORY_SEPARATOR . '.php_cs';
}

Expand Down

0 comments on commit 86a0f41

Please sign in to comment.