From c8f8da800fa7a7fde408c4261926f7c05b7f7693 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Wed, 12 Oct 2022 14:12:11 +1100 Subject: [PATCH] wp-env: Use case insensitive regex when checking WP version string 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. --- packages/env/lib/download-wp-phpunit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/env/lib/download-wp-phpunit.js b/packages/env/lib/download-wp-phpunit.js index 923750d58b1d7..3900fd9495343 100644 --- a/packages/env/lib/download-wp-phpunit.js +++ b/packages/env/lib/download-wp-phpunit.js @@ -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 {