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

Return empty slice from ListInstallations #3339

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

erikced
Copy link

@erikced erikced commented Feb 20, 2025

What does this change

Return an empty slice instead of a nil slice if there are no matching installations, so that the json marshaler returns [] instead of null.

What issue does it fix

Closes #3338

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Return an empty slice instead of a `nil` slice if there are no matching
installations, so that the json marshaler returns `[]` instead of
`null` when outputting json.

Signed-off-by: Erik Cederberg <[email protected]>
Signed-off-by: Erik Cederberg <[email protected]>
@erikced erikced changed the title Fix installations json output Return empty slice from ListInstallations Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Porter returns null when listing installations
2 participants