diff --git a/src/Commands/ValidateCommand.php b/src/Commands/ValidateCommand.php index e673d25..1980010 100755 --- a/src/Commands/ValidateCommand.php +++ b/src/Commands/ValidateCommand.php @@ -215,9 +215,14 @@ protected function execute(InputInterface $input, OutputInterface $output) return 1; } - } elseif ($this->isGlobPatternFileSetable($globPatternFile)) { + } elseif($this->isGlobPatternFileSetable($globPatternFile)) { try { - $this->analyser->setGlobPatternFromFile($globPatternFile); + if ($this->isDefaultGlobPatternFilePresent()) { + $this->analyser->setGlobPatternFromFile($this->defaultLpvFile); + } + if ($globPatternFile) { + $this->analyser->setGlobPatternFromFile($globPatternFile); + } } catch (NonExistentGlobPatternFile $e) { $warning = "Warning: The provided glob pattern file " . "'$globPatternFile' doesn't exist."; diff --git a/tests/Commands/ValidateCommandTest.php b/tests/Commands/ValidateCommandTest.php index b830d5e..7ab2a68 100644 --- a/tests/Commands/ValidateCommandTest.php +++ b/tests/Commands/ValidateCommandTest.php @@ -1531,7 +1531,8 @@ public function givenGlobPatternTakesPrecedenceOverDefaultGlobPatternFile() $artifactFilenames = [ '.buildignore', 'phpspec.yml.dist', - 'Phulpfile' + 'Phulpfile', + '.lpv' ]; $this->createTemporaryFiles(