change console color for path command errors

This commit is contained in:
Syping 2025-11-26 11:53:45 +01:00
parent 4d15094dbe
commit 7ab250c03e

View file

@ -37,11 +37,15 @@ internal static partial class Commands {
environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString); environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString);
return 0; return 0;
} }
Console.ForegroundColor = ConsoleColor.Red;
Console.Error.WriteLine("Invalid Path Command"); Console.Error.WriteLine("Invalid Path Command");
Console.ResetColor();
return 1; return 1;
} }
catch (Exception exception) { catch (Exception exception) {
Console.ForegroundColor = ConsoleColor.Red;
Console.Error.WriteLine(exception.Message); Console.Error.WriteLine(exception.Message);
Console.ResetColor();
return -1; return -1;
} }
} }