{"record":{"id":"01b7b47ef07014f9","repo":"bmad-code-org/BMAD-METHOD","slug":"set-entry-missing-expected-module","errorCode":null,"errorMessage":"--set \"${entry}\": missing '='. Expected <module>.<key>=<value>","messagePattern":"--set \"(.+?)\": missing '='\\. Expected <module>\\.<key>=<value>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"tools/installer/set-overrides.js","lineNumber":41,"sourceCode":"const PROTOTYPE_POLLUTING_NAMES = new Set(['__proto__', 'prototype', 'constructor']);\n\nconst path = require('node:path');\nconst fs = require('./fs-native');\nconst yaml = require('yaml');\n\n/**\n * Parse a single `--set <module>.<key>=<value>` entry.\n * @param {string} entry - raw flag value\n * @returns {{module: string, key: string, value: string}}\n * @throws {Error} on malformed input\n */\nfunction parseSetEntry(entry) {\n  if (typeof entry !== 'string' || entry.length === 0) {\n    throw new Error('--set: empty entry. Expected <module>.<key>=<value>');\n  }\n  const eq = entry.indexOf('=');\n  if (eq === -1) {\n    throw new Error(`--set \"${entry}\": missing '='. Expected <module>.<key>=<value>`);\n  }\n  const lhs = entry.slice(0, eq);\n  // Note: only the LHS is trimmed. Values may legitimately contain leading\n  // or trailing whitespace (paths with spaces, quoted strings); module / key\n  // names cannot, so it's safe to be strict on the left.\n  const value = entry.slice(eq + 1);\n  const dot = lhs.indexOf('.');\n  if (dot === -1) {\n    throw new Error(`--set \"${entry}\": missing '.'. Expected <module>.<key>=<value>`);\n  }\n  const moduleCode = lhs.slice(0, dot).trim();\n  const key = lhs.slice(dot + 1).trim();\n  if (!moduleCode || !key) {\n    throw new Error(`--set \"${entry}\": empty module or key. Expected <module>.<key>=<value>`);\n  }\n  if (PROTOTYPE_POLLUTING_NAMES.has(moduleCode) || PROTOTYPE_POLLUTING_NAMES.has(key)) {\n    throw new Error(\n      `--set \"${entry}\": '__proto__', 'prototype', and 'constructor' are reserved and cannot be used as a module or key name.`,","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/tools/installer/set-overrides.js#L23-L59","documentation":"Thrown by parseSetEntry when the entry has no '=' separator. Without '=', there is no value side; the function refuses to guess where LHS ends and value begins. Note only the LHS is trimmed, so '=' placement is strict.","triggerScenarios":"Passing --set bmm.project_knowledge (no =value); a quoting accident that strips everything after the key; typo omitting the value.","commonSituations":"User forgets the =value portion; shell splits an unquoted argument; copy-paste from notes that abbreviated the format.","solutions":["Add =<value> to the argument.","If the value contains spaces or shell-special characters, quote the whole argument: --set 'bmm.key=value with spaces'.","Double-check that an earlier shell token didn't consume the '='."],"exampleFix":"# before\n#   --set bmm.project_knowledge\n#\n# after\n#   --set bmm.project_knowledge=research","handlingStrategy":"validation","validationCode":"function hasEquals(entry) { return typeof entry === 'string' && entry.indexOf('=') !== -1; }\nconst entries = raw.filter(hasEquals);\nconst overrides = parseSetEntries(entries);","typeGuard":"function isValidSetEntry(entry) {\n  return typeof entry === 'string' && /^[^.\\s]+\\.[^.\\s]+=.+$/.test(entry);\n}","tryCatchPattern":"try {\n  overrides = parseSetEntries(entries);\n} catch (e) {\n  if (/missing '='/.test(e.message)) {\n    // prompt the user for the missing value, or drop the entry\n  } else { throw e; }\n}","preventionTips":["Always pair a --set key with =value; quote the whole token if the value has spaces.","Validate --set tokens against the <module>.<key>=<value> regex in your wrapper before running the installer."],"tags":["cli","set-overrides","argument-parsing"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}