use SHOW for pg and eg, headless by default for both, but show inside Docker

This commit is contained in:
Ralf Vogler 2023-01-07 13:47:08 +01:00
parent cc183a6303
commit 09c3e57a8a
3 changed files with 7 additions and 2 deletions

View file

@ -8,7 +8,7 @@ import prompts from 'prompts'; // alternatives: enquirer, inquirer
const prompt = async o => (await prompts({name: 'name', type: 'text', message: 'Enter value', validate: s => s.length, ...o})).name;
const debug = process.env.PWDEBUG == '1'; // runs non-headless and opens https://playwright.dev/docs/inspector
const show = process.argv.includes('show', 2);
const show = process.env.SHOW == '1';
const headless = !debug && !show;
// const URL_LOGIN = 'https://www.amazon.de/ap/signin'; // wrong. needs some session args to be valid?