If winget can't be found - exit with error + text

pull/250/head
KnifMelti 2022-12-22 03:39:48 +01:00
parent 512584fbad
commit 78724ae344
1 changed files with 6 additions and 1 deletions

View File

@ -89,7 +89,7 @@ if (Test-Network) {
}
else {
Write-Log "Critical: List doesn't exist, exiting..." "Red"
New-Item "$WorkingDir\logs\list_error.txt" -Force
New-Item "$WorkingDir\logs\list_error.txt" -Value "List doesn't exist!" -Force
Exit 1
}
}
@ -216,6 +216,11 @@ if (Test-Network) {
Write-Log "User context execution not installed"
}
}
else {
Write-Log "Critical: An error occured, exiting..." "red"
New-Item "$WorkingDir\logs\winget_error.txt" -Value "Winget not installed or detected!" -Force
Exit 1
}
}
#End