From 8048ef85dbe26d024303aedfd5d5df340056ebd6 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Wed, 12 Oct 2022 14:36:23 +1100 Subject: [PATCH] wp-env: Use case insensitive regex when checking WP version string (#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. --- 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 923750d58b1d73..3900fd9495343d 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 {