Skip to content

Commit

Permalink
Merge pull request #60 from truh/fix-release-url
Browse files Browse the repository at this point in the history
Fix non-latest version URL on Windows
  • Loading branch information
Hind-M authored Oct 9, 2024
2 parents bf019a2 + 8265a97 commit 30453f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"
}
}

0 comments on commit 30453f7

Please sign in to comment.