File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 7272 if ( cfg . eg_email && cfg . eg_password ) console . info ( 'Using email and password from environment.' ) ;
7373 else console . info ( 'Press ESC to skip if you want to login in the browser.' ) ;
7474 const email = cfg . eg_email || await prompt ( { message : 'Enter email' } ) ;
75- const password = cfg . eg_password || await prompt ( { type : 'password' , message : 'Enter password' } ) ;
75+ const password = email && ( cfg . eg_password || await prompt ( { type : 'password' , message : 'Enter password' } ) ) ;
7676 if ( email && password ) {
7777 await page . click ( 'text=Sign in with Epic Games' ) ;
7878 await page . fill ( '#email' , email ) ;
Original file line number Diff line number Diff line change 4444 if ( cfg . gog_email && cfg . gog_password ) console . info ( 'Using email and password from environment.' ) ;
4545 else console . info ( 'Press ESC to skip if you want to login in the browser (not possible in headless mode).' ) ;
4646 const email = cfg . gog_email || await prompt ( { message : 'Enter email' } ) ;
47- const password = cfg . gog_password || await prompt ( { type : 'password' , message : 'Enter password' } ) ;
47+ const password = email && ( cfg . gog_password || await prompt ( { type : 'password' , message : 'Enter password' } ) ) ;
4848 if ( email && password ) {
4949 iframe . locator ( 'a[href="/logout"]' ) . click ( ) . catch ( _ => { } ) ; // Click 'Change account' (email from previous login is set in some cookie)
5050 await iframe . locator ( '#login_username' ) . fill ( email ) ;
Original file line number Diff line number Diff line change 5050 if ( cfg . pg_email && cfg . pg_password ) console . info ( 'Using email and password from environment.' ) ;
5151 else console . info ( 'Press ESC to skip if you want to login in the browser (not possible in default headless mode).' ) ;
5252 const email = cfg . pg_email || await prompt ( { message : 'Enter email' } ) ;
53- const password = cfg . pg_password || await prompt ( { type : 'password' , message : 'Enter password' } ) ;
53+ const password = email && ( cfg . pg_password || await prompt ( { type : 'password' , message : 'Enter password' } ) ) ;
5454 if ( email && password ) {
5555 await page . fill ( '[name=email]' , email ) ;
5656 await page . fill ( '[name=password]' , password ) ;
You can’t perform that action at this time.
0 commit comments