fix: output command name on binding.execute error

This commit is contained in:
CJ van den Berg 2024-11-18 23:00:20 +01:00
parent 729cc696c2
commit 00e2211904
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -119,7 +119,7 @@ const Binding = struct {
fn execute(self: *@This()) !void {
const id = self.command_id orelse
command.get_id_cache(self.command, &self.command_id) orelse {
return tp.exit_error(error.InputTargetNotFound, null);
return tp.exit_fmt("CommandNotFound: {s}", .{self.command});
};
try command.execute(id, .{ .args = .{ .buf = self.args } });
}