From e74e746213fa1a0ed0247d12b21874355cef1318 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 13 Nov 2021 20:35:50 +0100 Subject: [PATCH] Trim whitespaces wrt #282 --- scripts/bootstrap/bootstrap-haskell.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/bootstrap/bootstrap-haskell.ps1 b/scripts/bootstrap/bootstrap-haskell.ps1 index 9529646..ab0958a 100644 --- a/scripts/bootstrap/bootstrap-haskell.ps1 +++ b/scripts/bootstrap/bootstrap-haskell.ps1 @@ -246,6 +246,7 @@ if ($Silent -and !($InstallDir)) { $GhcupBasePrefix = ('{0}\' -f $GhcupBasePrefix) } + $GhcupBasePrefix = $GhcupBasePrefix.TrimEnd().TrimStart() if (!($GhcupBasePrefix)) { Print-Msg -color Red -msg "No directory specified!" } elseif (!(Test-Path -LiteralPath ('{0}' -f $GhcupBasePrefix))) { @@ -333,6 +334,7 @@ if ($CabalDir) { $CabalDirPrompt = Read-Host $CabDirEnv = ($defaultCabalDir,$CabalDirPrompt)[[bool]$CabalDirPrompt] + $CabDirEnv = $CabDirEnv.TrimEnd().TrimStart() if (!($CabDirEnv)) { Print-Msg -color Red -msg "No directory specified!" } elseif (!(Split-Path -IsAbsolute -Path "$CabDirEnv")) { @@ -444,6 +446,7 @@ if (!(Test-Path -Path ('{0}' -f $MsysDir))) { Print-Msg -color Magenta -msg 'Input existing MSys2 toolchain directory:' $MsysDir = Read-Host } + $MsysDir = $MsysDir.TrimEnd().TrimStart() if (!($MsysDir)) { Print-Msg -color Red -msg "No directory specified!" } elseif (!(Test-Path -LiteralPath ('{0}' -f $MsysDir))) {