Skip to content

Commit

Permalink
Implemented #117: Make fast disabling synchronization with an issue t…
Browse files Browse the repository at this point in the history
…racker

 - Added supporting path to file.
  • Loading branch information
andkirby committed Sep 2, 2016
1 parent e94347a commit 1e59296
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/lib/PreCommit/Console/Command/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,16 @@ protected function getCustomTestFiles(InputInterface $input, OutputInterface $ou
throw new Exception('Sorry, absolute path is not supported so far.');
}

$finder = new Finder();
$finder->files()->in($path);

/** @var SplFileInfo $file */
foreach ($finder as $file) {
$customFiles[] = rtrim($path, '\\/').DIRECTORY_SEPARATOR.$file->getRelativePathname();
if (is_file($path)) {
$customFiles[] = $path;
} else {
$finder = new Finder();
$finder->files()->in($path);

/** @var SplFileInfo $file */
foreach ($finder as $file) {
$customFiles[] = rtrim($path, '\\/').DIRECTORY_SEPARATOR.$file->getRelativePathname();
}
}
}

Expand Down

0 comments on commit 1e59296

Please sign in to comment.