File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 npm ci
3434 npm run build
3535 npm run link
36- npm run tests
3736 unity-cli --version
3837 - name : setup unity
3938 shell : bash
Original file line number Diff line number Diff line change @@ -372,9 +372,12 @@ export class LicensingClient {
372372 options . username = Buffer . from ( encodedUsername , 'base64' ) . toString ( 'utf-8' ) ;
373373 }
374374
375- const emailRegex : RegExp = / ^ [ ^ \s @ ] + @ [ ^ \s @ ] + \. [ ^ \s @ ] + $ / ;
375+ function isValidEmail ( email : string ) : boolean {
376+ const emailRegex : RegExp = / ^ [ ^ \s @ ] + @ [ ^ \s @ ] + \. [ ^ \s @ ] + $ / ;
377+ return emailRegex . test ( email ) ;
378+ }
376379
377- if ( options . username . length === 0 || ! emailRegex . test ( options . username ) ) {
380+ if ( options . username . length === 0 || ! isValidEmail ( options . username ) ) {
378381 throw Error ( 'Username must be your Unity ID email address!' ) ;
379382 }
380383
You can’t perform that action at this time.
0 commit comments