diff --git a/.changeset/fix-issue-280-setup-help.md b/.changeset/fix-issue-280-setup-help.md new file mode 100644 index 00000000..318b087f --- /dev/null +++ b/.changeset/fix-issue-280-setup-help.md @@ -0,0 +1 @@ +---\n"@googleworkspace/cli": patch\n---\n\nfix(setup): handle --help explicitly in setup flow to prevent accidental project creation diff --git a/src/setup.rs b/src/setup.rs index c3302c78..6ab550c7 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -1599,6 +1599,16 @@ fn prompt_login_after_setup() -> Result { /// Run the full setup flow. Orchestrates all steps and outputs JSON summary. pub async fn run_setup(args: &[String]) -> Result<(), GwsError> { let opts = parse_setup_args(args); + if args.iter().any(|a| a == "--help" || a == "-h") { + eprintln!( + "Usage: gws auth setup [options]\n\n\ + Options:\n \ + --project Use a specific GCP project\n \ + --login Run `gws auth login` after successful setup\n \ + --dry-run Preview changes without making them" + ); + return Ok(()); + } let dry_run = opts.dry_run; let interactive = std::io::IsTerminal::is_terminal(&std::io::stdin()) && !dry_run;