Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-latest version URL on Windows #60

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}