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 {...@@ -40,7 +40,7 @@ pub fn execute(args: [][]u8) !void {
40 return;40 return;
41 }41 }
42 }42 }
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]});
44}44}
4545
46pub fn server_fetch(url: []const u8) !json.Value {46pub fn server_fetch(url: []const u8) !json.Value {
src/cmd/zpm.zig+1-1
...@@ -36,7 +36,7 @@ pub fn execute(args: [][]u8) !void {...@@ -36,7 +36,7 @@ pub fn execute(args: [][]u8) !void {
36 return;36 return;
37 }37 }
38 }38 }
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]});
40}40}
4141
42pub fn server_fetch(url: []const u8) !json.Value {42pub fn server_fetch(url: []const u8) !json.Value {