Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid command producing an error shows usage string unnecessarily when using "list environments" #318

Closed
seanhamlin opened this issue Feb 18, 2024 · 0 comments · Fixed by #301
Labels
bug Something isn't working

Comments

@seanhamlin
Copy link
Collaborator

Describe the bug

Similar to #296 if you list environments for a project with zero environments, then it produces an error, and emits the help text.

Error: no environments found for project
Usage:
  lagoon list environments [flags]

Aliases:
  environments, e

Flags:
  -h, --help   help for environments

Global Flags:
      --config-file string   Path to the config file to use (must be *.yml or *.yaml)
      --debug                Enable debugging output (if supported)
  -e, --environment string   Specify an environment to use
      --force                Force yes on prompts (if supported)
  -l, --lagoon string        The Lagoon instance to interact with
      --no-header            No header on table (if supported)
      --output-csv           Output as CSV (if supported)
      --output-json          Output as JSON (if supported)
      --pretty               Make JSON pretty (if supported)
  -p, --project string       Specify a project to use
      --skip-update-check    Skip checking for updates
  -i, --ssh-key string       Specify path to a specific SSH key to use for lagoon authentication

Expected behavior

As this is a valid command, and the project is real, then it should just produce the a result set of zero results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant