@@ -227,15 +227,15 @@ |
||
| 227 | 227 | $promises = []; |
| 228 | 228 | /** @var SplFileInfo $file */ |
| 229 | 229 | foreach ($finder as $file) { |
| 230 | - //always create a valid path. Especialy when using the -i option there |
|
| 231 | - //will not be a valid path information for every file |
|
| 232 | - $filePath = getcwd().'/'.str_replace(getcwd(), '', $file->getPath().'/'.$file->getFilename()); |
|
| 233 | - //need to check when the -i option is used |
|
| 234 | - if (!file_exists($filePath)) { |
|
| 235 | - continue; |
|
| 236 | - } |
|
| 237 | - |
|
| 238 | - $doc = $this->frontMatter->parse(file_get_contents($filePath)); |
|
| 230 | + //always create a valid path. Especialy when using the -i option there |
|
| 231 | + //will not be a valid path information for every file |
|
| 232 | + $filePath = getcwd().'/'.str_replace(getcwd(), '', $file->getPath().'/'.$file->getFilename()); |
|
| 233 | + //need to check when the -i option is used |
|
| 234 | + if (!file_exists($filePath)) { |
|
| 235 | + continue; |
|
| 236 | + } |
|
| 237 | + |
|
| 238 | + $doc = $this->frontMatter->parse(file_get_contents($filePath)); |
|
| 239 | 239 | $output->writeln("<info>Loading data from ${file}</info>"); |
| 240 | 240 | |
| 241 | 241 | if (!array_key_exists('target', $doc->getData())) { |