diff --git a/src/main.zig b/src/main.zig index b97317c..7c87649 100644 --- a/src/main.zig +++ b/src/main.zig @@ -85,7 +85,16 @@ pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; const allocator = gpa.allocator(); - const config = try readConfig(allocator, "config.json"); + + var args = std.process.args(); + _ = args.skip(); + + const config_path = args.next(); + + const config = blk: { + break :blk if (config_path) |path| try readConfig(allocator, path) else try readConfig(allocator, "config.json"); + }; + defer config.deinit(); const b64 = std.base64.standard.Encoder;