{"record":{"id":"141634718cedc429","repo":"denoland/deno","slug":"equal-sign-is-needed-when-assigning-values-to-v","errorCode":null,"errorMessage":"equal sign is needed when assigning values to '--v8-flags'","messagePattern":"equal sign is needed when assigning values to '--v8-flags'","errorType":"validation","errorClass":"AnyError","httpStatus":null,"severity":"error","filePath":"libs/dcore/src/main.rs","lineNumber":216,"sourceCode":"          seen_inspect_flag = Some(match name {\n            \"--inspect\" => \"--inspect\",\n            \"--inspect-brk\" => \"--inspect-brk\",\n            _ => \"--inspect-wait\",\n          });\n          let addr = parse_addr(name, value)?;\n          match name {\n            \"--inspect\" => out.inspect = Some(addr),\n            \"--inspect-wait\" => out.inspect_wait = Some(addr),\n            // `--inspect-brk` is accepted but not wired up to the inspector\n            // server, matching the previous clap-based behavior.\n            _ => {}\n          }\n        }\n        \"--strace-ops\" => out.strace_ops = true,\n        \"--strace-ops-summary\" => out.strace_ops_summary = true,\n        \"--v8-flags\" => {\n          let Some(value) = value else {\n            bail!(\"equal sign is needed when assigning values to '--v8-flags'\");\n          };\n          out.v8_flags.extend(value.split(',').map(String::from));\n        }\n        _ if name.starts_with('-') && name != \"-\" => {\n          bail!(\"unexpected argument '{name}' found\");\n        }\n        _ => {\n          if file_path.is_some() {\n            bail!(\"unexpected argument '{arg}' found\");\n          }\n          file_path = Some(arg);\n        }\n      }\n    }\n\n    let Some(file_path) = file_path else {\n      bail!(\n        \"the following required arguments were not provided:\\n  <file_path>\"","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/libs/dcore/src/main.rs#L198-L234","documentation":"`dcore`'s `--v8-flags` takes its value only in equals form (`--v8-flags=<flags>`), mirroring clap's require_equals behavior. The parser splits each argument on the first `=`; when the flag name appears with no `=`-attached value, it bails with this message instead of consuming the next token.","triggerScenarios":"Running `dcore --v8-flags --expose-gc app.js` or a bare `dcore --v8-flags`; multiple V8 flags are comma-separated in one value: `--v8-flags=--expose-gc,--max-old-space-size=4096`.","commonSituations":"Habitual space-separated flag syntax from other CLIs; forgetting that this specific flag requires `=`; not knowing `DCORE_V8_FLAGS` env var is the alternative.","solutions":["Use the equals form: `dcore --v8-flags=--expose-gc app.js`.","Comma-separate multiple flags in one value: `--v8-flags=--expose-gc,--stack-size=984`.","Or set the environment variable instead: `export DCORE_V8_FLAGS=--expose-gc` (CLI flags are appended after it)."],"exampleFix":"# before\ndcore --v8-flags --expose-gc app.js\n# error: equal sign is needed when assigning values to '--v8-flags'\n\n# after\ndcore --v8-flags=--expose-gc app.js\ndcore --v8-flags=--expose-gc,--max-old-space-size=4096 app.js","handlingStrategy":"validation","validationCode":"# catch space-separated --v8-flags before launch\nfor a in \"$@\"; do\n  [ \"$a\" = \"--v8-flags\" ] && { echo \"use --v8-flags=<comma-separated flags>\"; exit 2; }\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write V8 flags with an equals sign in dcore commands.","Prefer DCORE_V8_FLAGS for persistent settings; append CLI flags after it.","Comma-separate multiple V8 flags inside one --v8-flags= value."],"tags":["cli","v8-flags","arguments","dcore"],"backgroundTag":"missing-flag-value","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}