1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 15:39:42 +00:00

fix: repair command icon and null input handling

- Replace non-existent Icons.Mole with Icons.Admin
- Add null check for empty menu input
This commit is contained in:
Bhadra
2026-01-12 12:14:15 +05:30
parent 1e75d916df
commit a2f0ae6078

View File

@@ -370,7 +370,7 @@ function Show-RepairMenu {
)
Write-Host ""
Write-Host "$esc[1;35m$($script:Icons.Mole) Mole Repair$esc[0m"
Write-Host "$esc[1;35m$($script:Icons.Admin) Mole Repair$esc[0m"
Write-Host ""
if ($script:IsDryRun) {
@@ -388,6 +388,10 @@ function Show-RepairMenu {
Write-Host ""
$choice = Read-Host "Choice"
if ([string]::IsNullOrWhiteSpace($choice)) {
return
}
$selected = $menuItems | Where-Object { $_.Key -eq $choice.ToUpper() }
if ($selected -and $selected.Action) {
@@ -440,7 +444,7 @@ function Main {
# Run specific repairs
Write-Host ""
Write-Host "$esc[1;35m$($script:Icons.Mole) Mole Repair$esc[0m"
Write-Host "$esc[1;35m$($script:Icons.Admin) Mole Repair$esc[0m"
if ($script:IsDryRun) {
Write-Host ""