authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-06 01:47:10 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-06 01:47:10 -07:00
log98008261b5488e78df0bea3021f8b43c7ad6b125
tree7abc86c34b50b9168d67d883b1a27b5a0f3cee5e
parent7ff589bc32a093732690f3187d042c16f32cf171

cmd: use assertion instead of panic for unfound command to prevent stack trace


2 files changed, 2 insertions(+), 2 deletions(-)

src/cmd/aq.zig+1-1
......@@ -40,7 +40,7 @@ pub fn execute(args: [][]u8) !void {
4040 return;
4141 }
4242 }
43 std.debug.panic("error: unknown command \"{s}\" for \"zigmod aq\"", .{args[0]});
43 u.assert(false, "unknown command \"{s}\" for \"zigmod aq\"", .{args[0]});
4444}
4545
4646pub fn server_fetch(url: []const u8) !json.Value {
src/cmd/zpm.zig+1-1
......@@ -36,7 +36,7 @@ pub fn execute(args: [][]u8) !void {
3636 return;
3737 }
3838 }
39 std.debug.panic("error: unknown command \"{s}\" for \"zigmod zpm\"", .{args[0]});
39 u.assert(false, "unknown command \"{s}\" for \"zigmod zpm\"", .{args[0]});
4040}
4141
4242pub fn server_fetch(url: []const u8) !json.Value {