{"record":{"id":"f269194a62c012d2","repo":"nodejs/node","slug":"s-error-in-command-line-argument-s-n","errorCode":null,"errorMessage":"%s: error in command line argument \"%s\"\\n","messagePattern":"(.+?): error in command line argument \"(.+?)\"\\\\n","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/genrb/derb.cpp","lineNumber":106,"sourceCode":"    /* Get the name of tool. */\n    pname = uprv_strrchr(*argv, U_FILE_SEP_CHAR);\n#if U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR\n    if (!pname) {\n        pname = uprv_strrchr(*argv, U_FILE_ALT_SEP_CHAR);\n    }\n#endif\n    if (!pname) {\n        pname = *argv;\n    } else {\n        ++pname;\n    }\n\n    /* error handling, printing usage message */\n    argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options);\n\n    /* error handling, printing usage message */\n    if(argc<0) {\n        fprintf(stderr,\n            \"%s: error in command line argument \\\"%s\\\"\\n\", pname,\n            argv[-argc]);\n    }\n    if(argc<0 || options[0].doesOccur || options[1].doesOccur) {\n        fprintf(argc < 0 ? stderr : stdout,\n            \"%csage: %s [ -h, -?, --help ] [ -V, --version ]\\n\"\n            \" [ -v, --verbose ] [ -e, --encoding encoding ] [ --bom ]\\n\"\n            \" [ -t, --truncate [ size ] ]\\n\"\n            \" [ -s, --sourcedir source ] [ -d, --destdir destination ]\\n\"\n            \" [ -i, --icudatadir directory ] [ -c, --to-stdout ]\\n\"\n            \" [ -A, --suppressAliases]\\n\"\n            \" bundle ...\\n\", argc < 0 ? 'u' : 'U',\n            pname);\n        return argc<0 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR;\n    }\n\n    if(options[10].doesOccur) {\n        fprintf(stderr,","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/genrb/derb.cpp#L88-L124","documentation":"derb (the resource-bundle disassembler, sibling of genrb) parses its options with u_parseArgs. A negative return means a bad token; derb prints pname (program name) and the offending argv[-argc]. The subsequent block may also print a full usage banner depending on flags.","triggerScenarios":"Passing an unknown option, an option requiring a value without one (e.g. -e with no encoding), or otherwise malformed arguments to derb. pname is derived from argv[0] (stripped to the basename).","commonSituations":"Running derb by hand with a typo'd flag; using a flag that belongs to genrb, not derb; a wrapper script that injects an extra option derb does not understand.","solutions":["Run `derb -h` to list supported options and remove the offending token shown in the message.","Confirm each value-taking flag (-e, -t, -s, -d, -i) is followed by its argument.","Check the derb invocation in your script against the documented option set."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// derb supported flags\nVALID_DERB = {'-h','-?','--help','-V','--version','-v','--verbose','-e','--encoding','--bom','-t','--truncate','-s','--sourcedir','-d','--destdir','-i','--icudatadir','-c','--to-stdout','-A','--suppressAliases'}\nbad = [a for a in argv[1:] if a.startswith('-') and a.split('=')[0] not in VALID_DERB]\nif bad: raise SystemExit(f'unknown derb option(s): {bad}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always supply the argument to value-taking flags (-e,-t,-s,-d,-i).","Don't reuse a genrb command line for derb; their option sets differ."],"tags":["icu","derb","genrb","cli","arg-parse"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}