skip prompt for password if email is missing
This commit is contained in:
parent
65a389c3d9
commit
dff712d998
3 changed files with 3 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ try {
|
|||
if (cfg.pg_email && cfg.pg_password) console.info('Using email and password from environment.');
|
||||
else console.info('Press ESC to skip if you want to login in the browser (not possible in default headless mode).');
|
||||
const email = cfg.pg_email || await prompt({message: 'Enter email'});
|
||||
const password = cfg.pg_password || await prompt({type: 'password', message: 'Enter password'});
|
||||
const password = email && (cfg.pg_password || await prompt({type: 'password', message: 'Enter password'}));
|
||||
if (email && password) {
|
||||
await page.fill('[name=email]', email);
|
||||
await page.fill('[name=password]', password);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue