Allow changelogger regex to find directories with woocommerce* names (#35642)

* Allow matcher to find directories with woocommerce* names

* Allow package preparation script to run regardless of directory name repo is in
This commit is contained in:
Thomas Roberts 2023-05-05 01:20:11 +03:00 committed by GitHub
parent 358e1a4066
commit 6057798c34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class Package_Formatter extends Formatter implements FormatterPlugin {
*/
public function getReleaseLink( $version ) {
// Catpure anything past /woocommerce in the current working directory.
preg_match( '/\/woocommerce\/packages\/js\/(.+)/', getcwd(), $path );
preg_match( '/\/packages\/js\/(.+)/', getcwd(), $path );
if ( ! count( $path ) ) {
throw new \InvalidArgumentException( 'Invalid directory.' );