diff --git a/__tests__/lib/cli/envAlias.js b/__tests__/lib/cli/envAlias.js index 690db9d5d..d0b70b706 100644 --- a/__tests__/lib/cli/envAlias.js +++ b/__tests__/lib/cli/envAlias.js @@ -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 ); } ); diff --git a/src/lib/cli/envAlias.ts b/src/lib/cli/envAlias.ts index c295500ed..1360feb26 100644 --- a/src/lib/cli/envAlias.ts +++ b/src/lib/cli/envAlias.ts @@ -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 ) {