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:
@@ -370,7 +370,7 @@ function Show-RepairMenu {
|
|||||||
)
|
)
|
||||||
|
|
||||||
Write-Host ""
|
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 ""
|
Write-Host ""
|
||||||
|
|
||||||
if ($script:IsDryRun) {
|
if ($script:IsDryRun) {
|
||||||
@@ -388,6 +388,10 @@ function Show-RepairMenu {
|
|||||||
Write-Host ""
|
Write-Host ""
|
||||||
$choice = Read-Host "Choice"
|
$choice = Read-Host "Choice"
|
||||||
|
|
||||||
|
if ([string]::IsNullOrWhiteSpace($choice)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
$selected = $menuItems | Where-Object { $_.Key -eq $choice.ToUpper() }
|
$selected = $menuItems | Where-Object { $_.Key -eq $choice.ToUpper() }
|
||||||
|
|
||||||
if ($selected -and $selected.Action) {
|
if ($selected -and $selected.Action) {
|
||||||
@@ -440,7 +444,7 @@ function Main {
|
|||||||
|
|
||||||
# Run specific repairs
|
# Run specific repairs
|
||||||
Write-Host ""
|
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) {
|
if ($script:IsDryRun) {
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|||||||
Reference in New Issue
Block a user