ragephoto-cli 0.1.0 release

- Commands.Win32.cs: adapt how Invalid Path Command error is triggered
This commit is contained in:
Syping 2025-12-04 12:01:58 +01:00
parent d93741acc4
commit 62f6fab345
3 changed files with 8 additions and 2 deletions

View file

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