From 8265a97d25eedf265f2d03f7a3d3c700ff4415e4 Mon Sep 17 00:00:00 2001 From: Jakob Klepp <1183303+truh@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:43:01 +0200 Subject: [PATCH] Fix release URL when VERSION != latest Latest download URL is structured differently than version download URL. --- install.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install.ps1 b/install.ps1 index eae6713..9066549 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,7 +1,9 @@ # check if VERSION env variable is set, otherwise use "latest" -$VERSION = if ($null -eq $Env:VERSION) { "latest" } else { $Env:VERSION } - -$RELEASE_URL="https://github.com/mamba-org/micromamba-releases/releases/$VERSION/download/micromamba-win-64" +$RELEASE_URL = if ($null -eq $Env:VERSION) { + "https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-win-64" +} else { + "https://github.com/mamba-org/micromamba-releases/releases/download/$Env:VERSION/micromamba-win-64" +} Write-Output "Downloading micromamba from $RELEASE_URL" curl.exe -L -o micromamba.exe $RELEASE_URL @@ -41,4 +43,4 @@ if ($choice -eq "y" -or $choice -eq "Y" -or $choice -eq "") { & $MAMBA_INSTALL_PATH shell init -s powershell -p $prefix } else { Write-Output "`nYou can always initialize powershell or cmd.exe with micromamba by running `nmicromamba shell init -s powershell -p $Env:UserProfile\micromamba`n" -} \ No newline at end of file +}