Skip to content

Commit 0c32d1f

Browse files
committed
Change Write-Host to Write-Output
Saltstack still needs the output, but the PS linter doesn't like when the Write-Host method is used
1 parent cdf981e commit 0c32d1f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

notepad-plusplus/files/npp_install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ foreach ($path in $paths) {
3030

3131
# Execute the EXE-based installer
3232
if (-not $installed) {
33-
Write-Host "Version $target not found. Attempting to install from $tempExe..."
33+
Write-Output "Version $target not found. Attempting to install from $tempExe..."
3434
try {
3535
# "remote" files may get marked as blocked. Bypass that nonsense
3636
Unblock-File -Path $tempExe -ErrorAction SilentlyContinue
@@ -49,7 +49,7 @@ if (-not $installed) {
4949
foreach ($path in $paths) { if (Test-Path $path) { $verified = $true } }
5050

5151
if ($verified) {
52-
Write-Host "Installation successful (Exit Code: $exitCode)."
52+
Write-Output "Installation successful (Exit Code: $exitCode)."
5353
exit 0
5454
} else {
5555
Write-Error "Installer finished (Exit Code: $exitCode) but registry keys not found."
@@ -60,6 +60,6 @@ if (-not $installed) {
6060
exit 1
6161
}
6262
} else {
63-
Write-Host "Notepad++ $target already installed. Skipping."
63+
Write-Output "Notepad++ $target already installed. Skipping."
6464
exit 0
6565
}

0 commit comments

Comments
 (0)