mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 14:26:46 +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:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user