Skip to content

{ "error": { "code": 400, "message": "gcloud CLI not found. Install it from https://cloud.google.com/sdk/docs/install", "reason": "validationError" } } executes setup instead of showing help #280

@stablegenius49

Description

@stablegenius49

Hi team — I found a UX bug while trying the CLI:

Repro

gws auth setup --help

On machines without gcloud, this executes setup and fails with:

{
  "error": {
    "code": 400,
    "message": "gcloud CLI not found. Install it from https://cloud.google.com/sdk/docs/install",
    "reason": "validationError"
  }
}

Expected behavior is to print setup help/usage and exit successfully.

Proposed fix

Early-return from run_setup() when -h/--help is present, before any setup checks.

I prepared a patch in my fork/branch:

I also added unit tests for the help flag detection.

I couldn't open a PR directly because this repo currently blocks PR creation for non-collaborators (CreatePullRequest permission error), so sharing via issue + compare link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions