File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,23 @@ $deletedFiles = Get-ChangedFiles -DiffPath $TargetPath -DiffFilterType "D"
5353if ($changedFiles ) {
5454 $changedServices = Get-ChangedServices - ChangedFiles $changedFiles
5555}
56+ else {
57+ # ensure we default this to an empty array if not set
58+ $changedFiles = @ ()
59+ }
5660
5761# ExcludePaths is an object array with the default of [] which evaluates to null.
5862# If the value is null, set it to empty list to ensure that the empty list is
5963# stored in the json
6064if (-not $ExcludePaths ) {
6165 $ExcludePaths = @ ()
6266}
67+ if (-not $deletedFiles ) {
68+ $deletedFiles = @ ()
69+ }
70+ if (-not $changedServices ) {
71+ $changedServices = @ ()
72+ }
6373$result = [PSCustomObject ]@ {
6474 " ChangedFiles" = $changedFiles
6575 " ChangedServices" = $changedServices
You can’t perform that action at this time.
0 commit comments