Now only "error.txt"
parent
dd9930e3d9
commit
d6a7c99b6c
|
@ -83,7 +83,7 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
#Test if there was a list_/winget_error
|
#Test if there was a list_/winget_error
|
||||||
if (Test-Path "$WorkingDir\logs\*_error.txt") {
|
if (Test-Path "$WorkingDir\logs\error.txt") {
|
||||||
$MessageType = "error"
|
$MessageType = "error"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -72,8 +72,8 @@ if (Test-Network) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#Delete previous list_/winget_error (if they exist) if System
|
#Delete previous list_/winget_error (if they exist) if System
|
||||||
if (Test-Path "$WorkingDir\logs\*_error.txt") {
|
if (Test-Path "$WorkingDir\logs\error.txt") {
|
||||||
Remove-Item "$WorkingDir\logs\*_error.txt" -Force
|
Remove-Item "$WorkingDir\logs\error.txt" -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
#Get External ListPath if System
|
#Get External ListPath if System
|
||||||
|
@ -89,7 +89,7 @@ if (Test-Network) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Log "Critical: List doesn't exist, exiting..." "Red"
|
Write-Log "Critical: List doesn't exist, exiting..." "Red"
|
||||||
New-Item "$WorkingDir\logs\list_error.txt" -Value "List doesn't exist!" -Force
|
New-Item "$WorkingDir\logs\error.txt" -Value "List doesn't exist!" -Force
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ if (Test-Network) {
|
||||||
if ($outdated -like "Problem:*") {
|
if ($outdated -like "Problem:*") {
|
||||||
Write-Log "Critical: An error occured, exiting..." "red"
|
Write-Log "Critical: An error occured, exiting..." "red"
|
||||||
Write-Log "$outdated" "red"
|
Write-Log "$outdated" "red"
|
||||||
New-Item "$WorkingDir\logs\winget_error.txt" -Value "$outdated" -Force
|
New-Item "$WorkingDir\logs\error.txt" -Value "$outdated" -Force
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ if (Test-Network) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Log "Critical: An error occured, exiting..." "red"
|
Write-Log "Critical: An error occured, exiting..." "red"
|
||||||
New-Item "$WorkingDir\logs\winget_error.txt" -Value "Winget not installed or detected!" -Force
|
New-Item "$WorkingDir\logs\error.txt" -Value "Winget not installed or detected!" -Force
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue