Lightpanda: the headless browser designed for AI and automation
`update`: remove nightly channel check
Halil Durak32fefeaa7a61
diff --git a/src/Config.zig b/src/Config.zigindex 992201a8e..9c2051ebf 100644--- a/src/Config.zig+++ b/src/Config.zig@@ -18,7 +18,6 @@const std = @import("std");const lp = @import("lightpanda");-const Updater = lp.Updater;const log = lp.log;const builtin = @import("builtin");const zenai = @import("zenai");@@ -189,10 +188,6 @@ fn injectScriptFileValidator(return list.append(allocator, bytes);}-fn nightlyChannelValidator(_: Allocator, _: *std.process.ArgIterator) !Updater.Channel {- return .nightly;-}-/// Definition for all the commands and its arguments. See @cli.zig for further.const Commands = cli.Builder(.{.{@@ -267,20 +262,7 @@ const Commands = cli.Builder(.{},.shared_options = CommonOptions,},- .{- .name = "update",- .options = .{- .{- .name = "channel",- .type = Updater.Channel,- .default = .stable,- .variants = .{- .{ .name = "nightly", .validator = nightlyChannelValidator },- },- },- },- .shared_options = CommonOptions,- },+ .{ .name = "update", .options = .{}, .shared_options = CommonOptions },.{ .name = "version", .options = .{} },});diff --git a/src/lightpanda.zig b/src/lightpanda.zigindex a6e3951bf..f7ec92c8b 100644--- a/src/lightpanda.zig+++ b/src/lightpanda.zig@@ -226,7 +226,7 @@ fn dumpContent(app: *App, mode: Config.DumpFormat, dump_opts: dump.Opts, frame:}/// Check `Config.zig` for `options`.-pub fn update(allocator: std.mem.Allocator, config: *const Config, options: anytype) !void {+pub fn update(allocator: std.mem.Allocator, config: *const Config) !void {var client = try Updater.init(allocator, config);defer client.deinit();@@ -235,7 +235,7 @@ pub fn update(allocator: std.mem.Allocator, config: *const Config, options: anytvar writer = stdout.writer(&buf);const w = &writer.interface;// Inform to stdout about version.- try client.inform(options.channel, w);+ try client.inform(w);}// Writes a single page's result object. Framing (the enclosing array and anydiff --git a/src/main.zig b/src/main.zigindex a733b0ba6..8d8442f0b 100644--- a/src/main.zig+++ b/src/main.zig@@ -80,8 +80,8 @@ fn run(allocator: Allocator, main_arena: Allocator) !void {try lp.Agent.listModels(allocator, opts);return std.process.cleanExit();},- .update => |options| {- try lp.update(allocator, &args, options);+ .update => {+ try lp.update(allocator, &args);return std.process.cleanExit();},else => {},