File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -260,3 +260,26 @@ Feature: Update WordPress core
260
260
| version |
261
261
| trunk |
262
262
| nightly |
263
+
264
+ Scenario : Installing latest nightly build should skip cache
265
+ Given a WP install
266
+
267
+ When I run `wp core upgrade --force http://wordpress.org/nightly-builds/wordpress-4.9-latest.zip`
268
+ Then STDOUT should contain:
269
+ """
270
+ Success:
271
+ """
272
+ And STDOUT should not contain:
273
+ """
274
+ Using cached
275
+ """
276
+
277
+ When I run `wp core upgrade --force http://wordpress.org/nightly-builds/wordpress-4.9-latest.zip`
278
+ Then STDOUT should contain:
279
+ """
280
+ Success:
281
+ """
282
+ And STDOUT should not contain:
283
+ """
284
+ Using cached
285
+ """
Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ public function download_package( $package ) {
55
55
$ cache_key = "core/ {$ filename }- {$ update ->locale }. {$ ext }" ;
56
56
$ cache_file = $ cache ->has ( $ cache_key );
57
57
58
- if ( $ cache_file && false === stripos ( $ package , 'https://wordpress.org/nightly-builds/ ' ) ) {
58
+ if ( $ cache_file && false === stripos ( $ package , 'https://wordpress.org/nightly-builds/ ' )
59
+ && false === stripos ( $ package , 'http://wordpress.org/nightly-builds/ ' ) ) {
59
60
WP_CLI ::log ( "Using cached file ' $ cache_file'... " );
60
61
copy ( $ cache_file , $ temp );
61
62
return $ temp ;
You can’t perform that action at this time.
0 commit comments