Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/fix-issue-280-setup-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---\n"@googleworkspace/cli": patch\n---\n\nfix(setup): handle --help explicitly in setup flow to prevent accidental project creation
10 changes: 10 additions & 0 deletions src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,16 @@ fn prompt_login_after_setup() -> Result<bool, GwsError> {
/// 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 <id> 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;

Expand Down
Loading