chore(pssa): apply safe PSScriptAnalyzer fixes (BOM, empty catch -> Write-Error, Write-Host -> Write-Output)

Applied automatic, low-risk fixes for PSScriptAnalyzer warnings. Please review changes for behavior-sensitive code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
igor04091968
2026-05-07 12:50:35 +03:00
co-authored by Copilot
parent 3e8a6981f5
commit 429501d4fe
12 changed files with 25220 additions and 28 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
[CmdletBinding()]
[CmdletBinding()]
param(
[string]$ConfigPath = 'C:\ProgramData\AWatch-rus\deployment-config.json',
[string]$ServerHost,
@@ -151,6 +151,6 @@ Register-ActivityWatchUserTasks -TaskDefinitions $taskDefinitions -LaunchScriptP
Register-ActivityWatchRecoveryTask -TaskName $config.recovery.taskName -RecoveryScriptPath $effectiveRecoveryScript -ConfigPath $effectiveConfigPath
Start-ActivityWatchTasks -TaskDefinitions $taskDefinitions -RecoveryTaskName $config.recovery.taskName
Write-Host 'Укрепление и восстановление ActivityWatch завершены.'
Write-Host "Конфигурация: $effectiveConfigPath"
Write-Host "Пользователи восстановлены: $($effectiveUsers -join ', ')"
Write-Output 'Укрепление и восстановление ActivityWatch завершены.'
Write-Output "Конфигурация: $effectiveConfigPath"
Write-Output "Пользователи восстановлены: $($effectiveUsers -join ', ')"