Skip to content

Commit 267c44f

Browse files
committed
fix: analyzer warning cast
1 parent 3da5d00 commit 267c44f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: run script analyzer
1515
run: |
1616
Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -Force
17-
Invoke-ScriptAnalyzer -Path ./src -Settings ./PSScriptAnalyzerSettings.psd1
17+
Invoke-ScriptAnalyzer -Path ./src -Settings ./PSScriptAnalyzerSettings.psd1 -Severity Warning
1818
Invoke-ScriptAnalyzer -Path ./src/ScoopPlaybook.psm1 -Settings CodeFormatting
1919
shell: pwsh
2020
- name: run unit test

src/ScoopPlaybook.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function RunMain {
173173
$roles = @($definitions[$([PlaybookKeys]::roles.ToString())])
174174
foreach ($role in $roles) {
175175
Write-Verbose "Checking role definition from [$basePath/roles/$role/tasks/]"
176-
$tasks = Get-ChildItem -LiteralPath "$basePath/roles/$role/tasks/" -File | Where-Object Extension -in @(".yml", ".yaml")
176+
$tasks = Get-ChildItem -LiteralPath "$basePath/roles/$role/tasks/" -File | Where-Object { $_.Extension -in @(".yml", ".yaml") }
177177
if ($null -eq $tasks) {
178178
continue
179179
}

0 commit comments

Comments
 (0)