{"record":{"id":"c5f90c73c24ed9a2","repo":"kovidgoyal/kitty","slug":"public-s","errorCode":null,"errorMessage":"%{public}s","messagePattern":"%\\{public\\}s","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kitty/launcher/main.c","lineNumber":369,"sourceCode":"    argv[0] = \"kitten\";\n    if (being_tested) {\n        printf(\"kitten_exe: %s\\n\", exe);\n        output_argv(\"argv\", argc, argv);\n        exit(0);\n    }\n    errno = 0;\n    execv(exe, argv);\n    fprintf(stderr, \"Failed to execute kitten (%s) with error: %s\\n\", exe, strerror(errno));\n    exit(1);\n}\n\nstatic bool\nparse_and_check_kitty_cli(CLISpec *cli_spec, int argc, char **argv) {\n    parse_cli_for_kitty(cli_spec, argc, argv);\n    if (cli_spec->errmsg) {\n        fprintf(stderr, \"%s\\n\", cli_spec->errmsg);\n#ifdef __APPLE__\n        os_log_error(OS_LOG_DEFAULT, \"%{public}s\", cli_spec->errmsg);\n#endif\n        return false;\n    }\n    return true;\n}\n\nstatic bool\nparse_and_check_panel_kitten_cli(CLISpec *cli_spec, int argc, char **argv) {\n    parse_cli_for_panel_kitten(cli_spec, argc, argv);\n    if (cli_spec->errmsg) {\n        fprintf(stderr, \"%s\\n\", cli_spec->errmsg);\n#ifdef __APPLE__\n        os_log_error(OS_LOG_DEFAULT, \"%{public}s\", cli_spec->errmsg);\n#endif\n        return false;\n    }\n    return true;\n}","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/launcher/main.c#L351-L387","documentation":"The kitty command line failed to parse; the parser's error message (unknown option, bad value, etc.) is printed to stderr and logged via os_log_error on macOS. The fast-path command aborts.","triggerScenarios":"Passing an unknown or malformed CLI flag to the kitty binary, e.g. a typo'd option or a bad value for a typed option.","commonSituations":"Typos in command line options; scripts using flags removed or renamed between kitty versions.","solutions":["Read the printed errmsg - it names the exact bad option","Run kitty --help / consult man kitty for valid options","Fix or remove the offending flag in your launcher script or alias"],"exampleFix":"# before\nkitty --new-os-widnow\n# after\nkitty --new-os-window","handlingStrategy":"validation","validationCode":"# validate flags in scripts before relying on them\nkitty --help >/dev/null || echo 'kitty unavailable'\n# after upgrades, dry-run your launch command manually once","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin kitty version in scripts and re-test flags after upgrades","Confirm an option exists in --help before scripting it"],"tags":["kitty","cli","argument-parsing"],"backgroundTag":"invalid-command-line-argument","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}