Skip to content

Commit

Permalink
SAST-Create-report: bug fix: provide default for report_teams param (#66
Browse files Browse the repository at this point in the history
)

We set the default value of the report_teams parameter to an empty
array so that when we pipe it to the ForEach-Object we don't get:

+     if ( ! $_.StartsWith("/") ) {
+          ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
  • Loading branch information
james-bostock-cx authored Dec 1, 2023
1 parent ff068e5 commit ca6a2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cx-sast-shell-tools/SAST-Create-Report.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ param(
[Parameter(Mandatory = $false)]
[string]$report_type = "PDF",
[Parameter(Mandatory = $false)]
[string[]]$report_teams
[string[]]$report_teams = @()
)

. "$PSScriptRoot/support/debug.ps1"
Expand Down

0 comments on commit ca6a2c9

Please # to comment.