diff --git a/src/BlockManager.php b/src/BlockManager.php index f4ce122..ace3fc1 100644 --- a/src/BlockManager.php +++ b/src/BlockManager.php @@ -116,8 +116,11 @@ protected function filesWithBlocks() { // Recursively look for any blocks in the output // directory, returning only the paths. - return explode( + $output = explode( "\n", trim(shell_exec("grep -l -r __torchlight-block- {$this->jigsaw->getDestinationPath()}/*")) ); + + // Filter out empty values caused by our grep query. + return array_filter($output); } }