Skip to content

Commit

Permalink
Merge pull request #1778 from Automattic/BB8-11225
Browse files Browse the repository at this point in the history
fix: underscore is allowed in environment name
  • Loading branch information
sjinks authored Apr 15, 2024
2 parents 76205cf + 88c5071 commit 416d702
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions __tests__/lib/cli/envAlias.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe( 'utils/cli/envAlias', () => {
'@1',
'@1.env',
'@2.MixedCaseEnv',
'@xxx.production_test',
] )( 'should identify valid aliases - %p', alias => {
expect( isAlias( alias ) ).toBe( true );
} );
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cli/envAlias.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function isAlias( alias: string ): boolean {
return /^@[A-Za-z0-9.-]+$/.test( alias );
return /^@[A-Za-z0-9._-]+$/.test( alias );
}

export function parseEnvAlias( alias: string ) {
Expand Down

0 comments on commit 416d702

Please sign in to comment.