1
0
Fork 0
pre-commit/testing/get-coursier.ps1
Daniel Baumann da7a7a571b
Merging upstream version 2.8.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-09 21:22:33 +01:00

11 lines
487 B
PowerShell
Executable file

$wc = New-Object System.Net.WebClient
$coursier_url = "https://github.com/coursier/coursier/releases/download/v2.0.5/cs-x86_64-pc-win32.exe"
$coursier_dest = "C:\coursier\cs.exe"
$coursier_hash ="d63d497f7805261e1cd657b8aaa626f6b8f7264cdb68219b2e6be9dd882033a9"
New-Item -Path "C:\" -Name "coursier" -ItemType "directory"
$wc.DownloadFile($coursier_url, $coursier_dest)
if ((Get-FileHash $coursier_dest -Algorithm SHA256).Hash -ne $coursier_hash) {
throw "Invalid coursier file"
}