diff --git a/src/cli.ts b/src/cli.ts index 4c210cf..71e5385 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -60,7 +60,8 @@ function _printHelp() { --beta: install @beta version of Playwright --ct: install Playwright Component testing --quiet: do not ask for interactive input prompts - --gha: install GitHub Actions + --gha: create GitHub Actions workflow + --no-gha: do not create GitHub Actions workflow --lang=: language to use (default: 'TypeScript'. Potential values: 'js', 'TypeScript') `); } diff --git a/src/generator.ts b/src/generator.ts index d4227e9..c19647b 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -42,6 +42,7 @@ type CliArgumentKey = 'browser' | 'ct' | 'quiet' | 'gha' + | 'no-gha' | 'install-deps' | 'lang'; @@ -129,8 +130,9 @@ export class Generator { type: 'confirm', name: 'installGitHubActions', message: 'Add a GitHub Actions workflow?', - initial: !!this.options.gha, - skip: !!this.options.gha, + // Default to false, even when --no-gha not passed + initial: !!this.options['no-gha'] ? false : !!this.options.gha, + skip: !!this.options['no-gha'] || !!this.options.gha, }, { type: 'confirm',