Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: better handling for nil results #374

Merged
merged 2 commits into from
Aug 13, 2024
Merged

Conversation

CGoodwin90
Copy link
Contributor

General Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

A number of commands don't have validation on key flags which results in errors & nil results.

This adds additional validation & a helper func to better handle nil results. Also adds newlines where relevant due to the change in output in PR #364

A couple examples:

Nil results
image

Error due to non-existent project being passed - lagoon delete org-p -p invalidProject --organization-name lagoon-demo-organization (More an api issue, but simple enough to handle here)
image

cmd/shared.go Outdated Show resolved Hide resolved
@shreddedbacon shreddedbacon force-pushed the better-handle-nil-results branch from 20fca58 to 720c63a Compare August 11, 2024 23:30
@shreddedbacon
Copy link
Member

Is this ready for review now?

@CGoodwin90 CGoodwin90 marked this pull request as ready for review August 12, 2024 23:44
@shreddedbacon shreddedbacon merged commit 9ce2ebc into main Aug 13, 2024
4 checks passed
@shreddedbacon shreddedbacon deleted the better-handle-nil-results branch August 13, 2024 00:03
@shreddedbacon shreddedbacon changed the title Fix: Adds better handling for nil results fix: better handling for nil results Aug 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants