Skip to content

Commit

Permalink
Merge pull request #13 from humanmade/check-path-empty
Browse files Browse the repository at this point in the history
Fix is_valid_test_path
  • Loading branch information
Chris Reynolds authored Mar 1, 2021
2 parents 55c62b7 + f608cf1 commit 3dcebea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/command/class-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ protected function get_config( $module = 'dev-tools' ) : array {
* @return boolean
*/
protected function is_valid_test_path( string $path ) : bool {
if ( empty( $path ) ) {
return false;
}
$full_path = $this->get_root_dir() . DIRECTORY_SEPARATOR . $path;
if ( strpos( $path, '*' ) !== false ) {
return ! empty( glob( $full_path ) );
Expand Down

0 comments on commit 3dcebea

Please sign in to comment.