Skip to content

Trim whitespace from user input in bootstrap script

Trim user input in bootstrap script.
Example:

First checking for Msys2...

Install MSys2
Do you want GHCup to install a default MSys2 toolchain (recommended)?
[Y] Yes  [N] No  [?] Help (default is "Y"): N
Skipping MSys2 installation.
Input existing MSys2 toolchain directory:
 C:\tools\msys64
MSys2 installation at ' C:\tools\msys64' could not be found!
Input existing MSys2 toolchain directory:
C:\tools\msys64
Setting GHCUP_MSYS2 env var to 'C:\tools\msys64'

A leading space pasted with the directory name caused the script to not find the entered directory.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information