major change to override Write-Error func
This commit is contained in:
@@ -24,13 +24,13 @@ Write-Output "Removed Paths:`n`r${REMOVE_PATH}"
|
||||
Try { Set-ItemProperty -Path $REG_ENVVAR -Name Path -Value $NEW_PATH }
|
||||
Catch
|
||||
{
|
||||
LogErr $_.Exception.Message
|
||||
LogErr "Failed to cleanup system path, using original values"
|
||||
Write-Error $_.Exception.Message
|
||||
Write-Error "Failed to cleanup system path, using original values"
|
||||
Try { Set-ItemProperty -Path $REG_ENVVAR -Name Path -Value $CURRENT_PATH }
|
||||
Catch
|
||||
{
|
||||
LogErr $_.Exception.Message
|
||||
LogErr "This is not good... !! DO NOT RESTART UNTIL SYSTEM PATH IS FIXED !!"
|
||||
Write-Error $_.Exception.Message
|
||||
Write-Error "This is not good... !! DO NOT RESTART UNTIL SYSTEM PATH IS FIXED !!"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user