From fa11ca665f80253a009a0df21ef762ee492e1fd4 Mon Sep 17 00:00:00 2001 From: Colin Barrett Date: Tue, 15 Jun 2021 22:25:24 -0400 Subject: [PATCH] Use GetFolderPath to get the Desktop location On my system, for example, Desktop is backed up with OneDrive --- bootstrap-haskell.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap-haskell.ps1 b/bootstrap-haskell.ps1 index a0f722a..5d9859e 100644 --- a/bootstrap-haskell.ps1 +++ b/bootstrap-haskell.ps1 @@ -319,8 +319,9 @@ if (!(Test-Path -Path ('{0}' -f $MsysDir))) { } Print-Msg -msg 'Creating shortcuts...' -Create-Shortcut -SourceExe ('{0}\msys2_shell.cmd' -f $MsysDir) -ArgumentsToSourceExe '-mingw64' -DestinationPath ('{0}\Desktop\Mingw haskell shell.lnk' -f $HOME) -Create-Shortcut -SourceExe 'https://www.msys2.org/docs/package-management' -ArgumentsToSourceExe '' -DestinationPath ('{0}\Desktop\Mingw package management docs.url' -f $HOME) +$DesktopDir = [Environment]::GetFolderPath("Desktop") +Create-Shortcut -SourceExe ('{0}\msys2_shell.cmd' -f $MsysDir) -ArgumentsToSourceExe '-mingw64' -DestinationPath ('{0}\Mingw haskell shell.lnk' -f $DesktopDir) +Create-Shortcut -SourceExe 'https://www.msys2.org/docs/package-management' -ArgumentsToSourceExe '' -DestinationPath ('{0}\Mingw package management docs.url' -f $DesktopDir) Print-Msg -msg ('Adding {0}\bin to Users Path...' -f $GhcupDir) Add-EnvPath -Path ('{0}\bin' -f ([System.IO.Path]::GetFullPath("$GhcupDir"))) -Container 'User'