File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -705,8 +705,15 @@ public function get_command_with_coverage( $cmd ) {
705705
706706 $ modify_command = function ( $ part ) {
707707 if ( preg_match ( '/(^wp )|( wp )|(\/wp )/ ' , $ part ) ) {
708- $ part = preg_replace ( '/(^wp )|( wp )|(\/wp )/ ' , '$1$2$3 ' , $ part );
709- $ part .= ' --require={TEST_RUN_DIR}/vendor/wp-cli/wp-cli-tests/utils/generate-coverage.php ' ;
708+ $ part = preg_replace ( '/(^wp )|( wp )|(\/wp )/ ' , '$1$2$3 ' , $ part );
709+
710+ $ require_path = '{TEST_RUN_DIR}/vendor/wp-cli/wp-cli-tests/utils/generate-coverage.php ' ;
711+ if ( ! file_exists ( $ this ->variables ['TEST_RUN_DIR ' ] . '/vendor/wp-cli/wp-cli-tests/utils/generate-coverage.php ' ) ) {
712+ // This file is not vendored inside the wp-cli-tests project
713+ $ require_path = '{TEST_RUN_DIR}/utils/generate-coverage.php ' ;
714+ }
715+ $ part .= " --require= {$ require_path }" ;
716+
710717 }
711718 return $ part ;
712719 };
You can’t perform that action at this time.
0 commit comments