Skip to content

Commit 7fd5ed1

Browse files
Allow Write-Host in lint config
Replace update-index Write-Output calls with Write-Host. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 2d86414 commit 7fd5ed1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/actions/update-index/src/Helper.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ function Show-RepoList {
4040
} elseif ($currentContext.AuthType -eq 'App') {
4141
Connect-GitHubApp -Organization $Owner -Default
4242
} else {
43-
Write-Output "Using existing GitHub context [$($currentContext.Name)] with auth type [$($currentContext.AuthType)]"
43+
Write-Host "Using existing GitHub context [$($currentContext.Name)] with auth type [$($currentContext.AuthType)]"
4444
}
4545
Get-GitHubContext | Select-Object * | Format-List | Out-String
4646
}
4747

4848
LogGroup "Get repositories for organization [$Owner]" {
4949
$rawRepos = Get-GitHubRepository -Owner $Owner
50-
Write-Output "Found $($rawRepos.Count) repositories"
50+
Write-Host "Found $($rawRepos.Count) repositories"
5151
$repos = $rawRepos | ForEach-Object {
5252
$rawRepo = $_
5353
$rawRepo.CustomProperties | Where-Object { $_.Name -eq 'Type' } | ForEach-Object {

.github/linters/.powershell-psscriptanalyzer.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
}
5151
}
5252
ExcludeRules = @(
53-
'PSAvoidUsingWriteHost', # Write-Host is acceptable in guidance scripts.
53+
'PSAvoidUsingWriteHost', # Write-Host is acceptable in scripts used for docs tooling and guidance.
5454
'PSMissingModuleManifestField', # This rule is not applicable until the module is built.
5555
'PSUseToExportFieldsInManifest'
5656
)

0 commit comments

Comments
 (0)