From 28ac7ee2ef96456a0749cb70f4139f48cefc68af Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Sun, 17 Dec 2023 17:54:26 -0600 Subject: [PATCH] Update install.ps1 --- install.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/install.ps1 b/install.ps1 index c91719a..a820402 100644 --- a/install.ps1 +++ b/install.ps1 @@ -3,11 +3,10 @@ $ErrorActionPreference = 'Stop' if ($v) { - $Tag = "v${v}" + $Version = "${v}" } if ($Args.Length -eq 1) { $Version = $Args.Get(0) - $Tag = "v${Version}" } $TypstInstall = $env:TYPST_INSTALL @@ -19,10 +18,10 @@ $Target = 'x86_64-pc-windows-msvc' $Folder = "typst-${Target}" $File = "$Folder.zip" -$URL = if (!$Tag) { - "https://github.com/typst/typst/releases/latest/download/$File" +$URL = if ($Version) { + "https://github.com/typst/typst/releases/download/v${Version}/$File" } else { - "https://github.com/typst/typst/releases/download/${Tag}/$File" + "https://github.com/typst/typst/releases/latest/download/$File" } if (!(Test-Path "$TypstInstall")) {