File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -75,14 +75,13 @@ private static function get_process_env_variables() {
75
75
// We cache the results of `wp core download` to improve test performance
76
76
// Ideally, we'd cache at the HTTP layer for more reliable tests
77
77
private static function cache_wp_files () {
78
- self :: $ cache_dir = sys_get_temp_dir () . ' /wp-cli-test core-download-cache ' ;
79
-
78
+ $ wp_version_suffix = ( $ wp_version = getenv ( ' WP_VERSION ' ) ) ? " - $ wp_version " : ' ' ;
79
+ self :: $ cache_dir = sys_get_temp_dir () . ' /wp-cli-test-core-download-cache ' . $ wp_version_suffix ;
80
80
if ( is_readable ( self ::$ cache_dir . '/wp-config-sample.php ' ) )
81
81
return ;
82
-
83
82
$ cmd = Utils \esc_cmd ( 'wp core download --force --path=%s ' , self ::$ cache_dir );
84
- if ( getenv ( ' WP_VERSION ' ) ) {
85
- $ cmd .= Utils \esc_cmd ( ' --version=%s ' , getenv ( ' WP_VERSION ' ) );
83
+ if ( $ wp_version ) {
84
+ $ cmd .= Utils \esc_cmd ( ' --version=%s ' , $ wp_version );
86
85
}
87
86
Process::create ( $ cmd , null , self ::get_process_env_variables () )->run_check ();
88
87
}
You can’t perform that action at this time.
0 commit comments