Skip to content

Commit

Permalink
Handle high level error abstration by std.process.exit on HelpCommand…
Browse files Browse the repository at this point in the history
… and InvalidCommand errors
  • Loading branch information
BitlyTwiser committed Sep 23, 2024
1 parent 622b7c4 commit c3de791
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sneaky.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c3de791

Please sign in to comment.