From c3de7912d32bd9fab9b9215932fc1c4cdb4dbf66 Mon Sep 17 00:00:00 2001 From: BitlyTwiser Date: Mon, 23 Sep 2024 08:28:19 -0700 Subject: [PATCH] Handle high level error abstration by std.process.exit on HelpCommand and InvalidCommand errors --- src/sneaky.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sneaky.zig b/src/sneaky.zig index abb006d..2a76ead 100644 --- a/src/sneaky.zig +++ b/src/sneaky.zig @@ -112,12 +112,12 @@ pub fn Snek(comptime CliInterface: type) type { CliError.HelpCommand => { try self.help(); - return e; + std.process.exit(0); }, CliError.InvalidCommand => { std.debug.print("Invalid cli command was passed. Please use -help or -h to check help menu for available commands", .{}); - return e; + std.process.exit(0); }, else => { return e;