From a5b430e4ae4bea4fe9c87241c0c8dfb564a2c4b3 Mon Sep 17 00:00:00 2001 From: pinguinfuss Date: Thu, 9 Mar 2023 13:39:08 +0100 Subject: [PATCH] Revert this to be in sync with max line length PSScriptAnalyzer rule --- src/Connection/Connect-To.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Connection/Connect-To.ps1 b/src/Connection/Connect-To.ps1 index af35c63..a15ab77 100644 --- a/src/Connection/Connect-To.ps1 +++ b/src/Connection/Connect-To.ps1 @@ -258,7 +258,9 @@ function Connect-To { # Check the Connection State if (-not $WinSCPSession.Opened) { # Check the connection state and find out if the session is still open. - Write-Error -Message ('Connection to {0} using Type {1} was established. But now it seems to be lost!' -f $RemoteHost, $Type) + $m = 'Connection to {0} using Type {1} was established. ' -f $RemoteHost, $Type + $m += 'But now it seems to be lost!' + Write-Error -Message $m } } 'NetAppFAS' { @@ -317,7 +319,9 @@ function Connect-To { # Check the Connection State if (!($WinSCPSession.Opened)) { # Check the connection state and find out if the session is still open. - Write-Error -Message ('Connection to {0} using Type {1} was established. But now it seems to be lost!' -f $RemoteHost, $Type) + $m = 'Connection to {0} using Type {1} was established. ' -f $RemoteHost, $Type + $m += 'But now it seems to be lost!' + Write-Error -Message $m } } default {