Add -Force to Move-Item in mago.ps1 to handle workflow reruns

Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-17 11:52:44 +00:00
parent ec1e2c6601
commit 20169f80b7

View File

@ -30,7 +30,7 @@ Function Add-Mago() {
$url = "https://github.com/carthage-software/mago/releases/download/$mago_tag/mago-$mago_tag-$arch_name-pc-windows-msvc.zip"
Get-File -Url $url -OutFile $bin_dir\mago.zip >$null 2>&1
Expand-Archive -Path $bin_dir\mago.zip -DestinationPath $bin_dir\mago -Force >$null 2>&1
Move-Item -Path $bin_dir\mago\mago-$mago_tag-$arch_name-pc-windows-msvc\mago.exe -Destination $bin_dir\mago.exe
Move-Item -Path $bin_dir\mago\mago-$mago_tag-$arch_name-pc-windows-msvc\mago.exe -Destination $bin_dir\mago.exe -Force
Add-ToProfile $current_profile 'mago' "New-Alias mago $bin_dir\mago.exe"
Add-Log $tick "mago" "Added mago $mago_tag"
}