Skip to content

Commit 7b0e2ea

Browse files
haoruizhouwfr-data-acquisition
authored andcommitted
Fix Windows installer ScriptAnalyzer path handling
1 parent 6649fd1 commit 7b0e2ea

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/windows-installer-ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,16 @@ jobs:
7474
7575
- name: Lint PowerShell scripts
7676
run: |
77-
$results = Invoke-ScriptAnalyzer `
78-
-Path universal-telemetry-software/deploy/install.ps1, universal-telemetry-software/deploy/windows-udp-relay.ps1 `
79-
-Severity Warning,Error -ExcludeRule PSAvoidUsingWriteHost
77+
$scripts = @(
78+
"universal-telemetry-software/deploy/install.ps1",
79+
"universal-telemetry-software/deploy/windows-udp-relay.ps1"
80+
)
81+
$results = $scripts | ForEach-Object {
82+
Invoke-ScriptAnalyzer `
83+
-Path $_ `
84+
-Severity Warning,Error `
85+
-ExcludeRule PSAvoidUsingWriteHost
86+
}
8087
$results | Format-Table -AutoSize
8188
$errors = @($results | Where-Object { $_.Severity -eq 'Error' })
8289
if ($errors.Count -gt 0) {

0 commit comments

Comments
 (0)