affaan-m/ECC · error
${option} requires a non-empty value for live node qualifica
Error message
${option} requires a non-empty value for live node qualification. What it means
Even when a required option appears exactly once, its value must be non-empty and must not look like another flag. requiredOptionValue rejects a value that is missing, whitespace-only, or begins with '--'. This catches the case where the value slot was accidentally filled by the next flag.
Source
Thrown at scripts/ito.js:101
Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1,
--live-sixtytwo, an explicit node list, and an existing absolute config
directory. It forwards only named SIXTYTWO_API_TOKEN/SIXTYTWO_TOKEN and SSH
agent state; ITO_API_KEY is intentionally excluded. The canonical CLI requires
sixtytwo-cli==0.3.33 and fails closed.
`);
}
function requiredOptionValue(args, option) {
const indexes = args
.map((value, index) => (value === option ? index : -1))
.filter((index) => index >= 0);
if (indexes.length !== 1) {
throw new Error(`${option} is required exactly once for live node qualification.`);
}
const value = args[indexes[0] + 1];
if (!value?.trim() || value.startsWith("--")) {
throw new Error(`${option} requires a non-empty value for live node qualification.`);
}
return value;
}
function validateNodeQualificationArgs(args, environment) {
if (environment.ITO_ENABLE_SIXTYTWO_LIVE !== "1") {
throw new Error(
"Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1 before any process is started."
);
}
if (args.filter((value) => value === "--live-sixtytwo").length !== 1) {
throw new Error(
"Live node qualification requires --live-sixtytwo exactly once before any process is started."
);
}
requiredOptionValue(args, "--cluster");
const nodes = requiredOptionValue(args, "--nodes");
if (!nodes.split(",").every((node) => node.trim().length > 0)) {View on GitHub (pinned to 01e15490f0)
Solutions
- Supply a concrete non-empty value that does not start with '--'
- Quote empty-prone shell variables and default them, e.g. ${CLUSTER:?must be set}
- Re-run with --help to confirm the expected value shape for each option
Example fix
// before --cluster --nodes n1 // after --cluster my-cluster --nodes n1
Defensive patterns
Strategy: validation
Validate before calling
function assertOptionHasValue(args, option) {
const i = args.indexOf(option);
if (i === -1) return;
const v = args[i + 1];
if (!v || !v.trim() || v.startsWith('--')) {
throw new Error(`${option} needs a non-empty value not starting with --`);
}
}
['--cluster','--nodes','--config-dir'].forEach(opt => assertOptionHasValue(args, opt)); Type guard
function optionHasConcreteValue(args, option) {
const i = args.indexOf(option);
if (i === -1) return true;
const v = args[i + 1];
return typeof v === 'string' && v.trim().length > 0 && !v.startsWith('--');
} Try / catch
try { validateNodeQualificationArgs(args, env); }
catch (err) {
if (/requires a non-empty value/.test(err.message)) {
console.error(err.message);
process.exit(2);
}
throw err;
} Prevention
- Quote shell variables and fail on empty expansion, e.g. ${VAR:?must be set}
- Never let a value flag immediately precede another flag
- Validate generated argv in wrappers before execution
When it happens
Trigger: Writing --cluster --nodes n1 (the value of --cluster is the next flag), --cluster '' (empty), or --cluster ' ' (whitespace only).
Common situations: Reordering flags so a value flag immediately precedes another flag, an unset shell variable expanding to empty, or a quoting mistake that drops the value.
Related errors
- ${option} is required exactly once for live node qualificati
- Live node qualification requires --live-sixtytwo exactly onc
- --nodes must explicitly list one or more non-empty nodes.
- Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1
- Unknown argument: ${arg}
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/a80044633be33d71.
Report an issue: GitHub.