Skip to content

Commit 404cdc1

Browse files
authored
Merge pull request #481 from Icinga:fix/unhandled_icinga_output
Fixes unhandled Icinga output
2 parents 7c13c13 + 3a91be6 commit 404cdc1

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/core/framework/Install-IcingaFrameworkComponent.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function Install-IcingaFrameworkComponent()
112112

113113
if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) {
114114
Write-IcingaConsoleNotice 'Updating Icinga JEA profile';
115-
Invoke-IcingaCommand { Install-IcingaJEAProfile; };
115+
Invoke-IcingaCommand -ScriptBlock { Install-IcingaJEAProfile; } | Out-Null;
116116
}
117117

118118
# Unload the module if it was loaded before

lib/core/framework/Install-IcingaFrameworkUpdate.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function Install-IcingaFrameworkUpdate()
109109
if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) {
110110
Remove-IcingaFrameworkDependencyFile;
111111
Write-IcingaConsoleNotice 'Updating Icinga JEA profile';
112-
Invoke-IcingaCommand { Install-IcingaJEAProfile; };
112+
Invoke-IcingaCommand -ScriptBlock { Install-IcingaJEAProfile; } | Out-Null;
113113
}
114114

115115
Write-IcingaConsoleNotice 'Framework update has been completed. Please start a new PowerShell instance now to complete the update';

lib/core/framework/Restart-IcingaService.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Restart-IcingaService()
3535
} catch {
3636
Write-IcingaConsoleError -Message 'Failed to restart service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message;
3737
}
38-
}
38+
} | Out-Null;
3939
} else {
4040
Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service;
4141
}

lib/core/framework/Start-IcingaService.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Start-IcingaService()
3535
} catch {
3636
Write-IcingaConsoleError -Message 'Failed to start service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message;
3737
}
38-
}
38+
} | Out-Null;
3939
} else {
4040
Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service;
4141
}

lib/core/framework/Stop-IcingaService.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Stop-IcingaService()
3535
} catch {
3636
Write-IcingaConsoleError -Message 'Failed to stop service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message;
3737
}
38-
}
38+
} | Out-Null;
3939
} else {
4040
Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service;
4141
}

0 commit comments

Comments
 (0)