1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-23 10:45:08 +00:00

fix(windows): align source channel and prerelease binaries

Refs #538
This commit is contained in:
Tw93
2026-03-06 08:34:10 +08:00
parent 7c9b420a22
commit d0f627892d
17 changed files with 732 additions and 453 deletions

40
bin/remove.ps1 Normal file
View File

@@ -0,0 +1,40 @@
# Mole - Remove Command
# Removes Mole from the current installation directory.
#Requires -Version 5.1
param(
[Alias('h')]
[switch]$ShowHelp
)
$ErrorActionPreference = "Stop"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$windowsDir = Split-Path -Parent $scriptDir
$installScript = Join-Path $windowsDir "install.ps1"
function Show-RemoveHelp {
$esc = [char]27
Write-Host ""
Write-Host "$esc[1;35mmo remove$esc[0m - Remove Mole from this system"
Write-Host ""
Write-Host "$esc[33mUsage:$esc[0m mo remove"
Write-Host ""
Write-Host "$esc[33mBehavior:$esc[0m"
Write-Host " - Removes the current Mole installation directory"
Write-Host " - Removes PATH entries created for this install"
Write-Host " - Prompts before deleting Mole config files"
Write-Host ""
}
if ($ShowHelp) {
Show-RemoveHelp
return
}
if (-not (Test-Path $installScript)) {
Write-Host "Installer not found at: $installScript" -ForegroundColor Red
exit 1
}
& $installScript -InstallDir $windowsDir -Uninstall