Skip to content

Commit 7ab250c

Browse files
committed
change console color for path command errors
1 parent 4d15094 commit 7ab250c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Commands.Win32.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ internal static Int32 PathFunction(String command) {
3737
environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString);
3838
return 0;
3939
}
40+
Console.ForegroundColor = ConsoleColor.Red;
4041
Console.Error.WriteLine("Invalid Path Command");
42+
Console.ResetColor();
4143
return 1;
4244
}
4345
catch (Exception exception) {
46+
Console.ForegroundColor = ConsoleColor.Red;
4447
Console.Error.WriteLine(exception.Message);
48+
Console.ResetColor();
4549
return -1;
4650
}
4751
}

0 commit comments

Comments
 (0)