Skip to content

Commit

Permalink
wp-env: Use case insensitive regex when checking WP version string (#…
Browse files Browse the repository at this point in the history
…44887)

WordPress version strings use '-RC1', not '-rc1'. This causes wp-env to
look for a tag in wordpress-develop that does not exist, which in turn
causes a fatal error.
  • Loading branch information
noisysocks authored and ockham committed Oct 18, 2022
1 parent 25d2b4c commit 8048ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/env/lib/download-wp-phpunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async function downloadTestSuite(
// Alpha, Beta, and RC versions are bleeding edge and should pull from trunk.
let ref;
const fetchRaw = [];
if ( ! wpVersion || wpVersion.match( /-(?:alpha|beta|rc)/ ) ) {
if ( ! wpVersion || wpVersion.match( /-(?:alpha|beta|rc)/i ) ) {
ref = 'trunk';
fetchRaw.push( 'fetch', 'origin', ref, '--depth', '1' );
} else {
Expand Down

0 comments on commit 8048ef8

Please sign in to comment.