╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ main.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
65 defer cmd_args.deinit(); 66 67 switch (try cmd.CommandDispatch.init(&cmd_args)) { 68 .invalid => |invalid| switch (invalid) { 69 .command => |command| { 70 try run_opts.err.print("\"{s}\" is not a valid command\n\n", .{command}); 71 try cmd.printHelp(null, run_opts.err); 72 return error.HandledError; 73 }, 74 .argument => |argument| { 75 try run_opts.err.print("\"{s}\" is not a valid argument\n\n", .{argument.value}); 76 try cmd.printHelp(argument.command, run_opts.err); 77 return error.HandledError; 78 }, 79 }, 80 .help => |cmd_kind_maybe| try cmd.printHelp(cmd_kind_maybe, run_opts.out), 81 .cli => |cli_cmd| switch (cli_cmd) { 82 .serve => |options| try srv.run(repo_kind, any_repo_opts, io, allocator, cwd_path, options, run_opts.err, {}), 83 }, 84 } 85 } 86