This fixes the case where there are no Deployments or Configurations and the recursive param was passed. In that case the response array was never created and was being encoded to null.
This fixes that by instantiating the response immediately as a variable length slice.
If recursive isn't passed it will be overwritten by readLatestDeploymentFiles
If recursive is passed and nothing is found it will still be an empty []
Intent
Fixes #1937
Type of Change
[x] Bug Fix
[ ] New Feature
[ ] Breaking Change
[ ] Documentation
[ ] Refactor
[ ] Tooling
Directions for Reviewers
Test with deployments/configs, without, and recursively
This fixes the case where there are no Deployments or Configurations and the
recursive
param was passed. In that case theresponse
array was never created and was being encoded tonull
.This fixes that by instantiating the
response
immediately as a variable length slice.If
recursive
isn't passed it will be overwritten byreadLatestDeploymentFiles
If
recursive
is passed and nothing is found it will still be an empty[]
Intent
Fixes #1937
Type of Change
Directions for Reviewers
Test with deployments/configs, without, and recursively