affaan-m/ECC · error

Missing value for --install-dir.

Error message

Missing value for --install-dir.

What it means

Thrown by parseStatusArguments in nasiko.js when --install-dir is the last argument or its next token starts with '--', i.e. the flag was given without a value. The status command needs the concrete directory to inspect.

Source

Thrown at scripts/nasiko.js:93

    throw new Error('ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.');
  }
  return candidate;
}

function readStatus(options = {}) {
  const executable = resolveExecutable(options);
  if (!executable) return { installed: false, qualified: false, version: null, executable: null };
  return inspectInstalledNasiko(executable);
}

function parseStatusArguments(argumentsList) {
  let options = { installDir: undefined, json: false };
  for (let index = 0; index < argumentsList.length; index += 1) {
    const argument = argumentsList[index];
    if (argument === '--json') options = { ...options, json: true };
    else if (argument === '--install-dir') {
      const value = argumentsList[index + 1];
      if (!value || value.startsWith('--')) throw new Error('Missing value for --install-dir.');
      options = { ...options, installDir: validateInstallDirectory(value) };
      index += 1;
    } else throw new Error(`Unknown Nasiko status argument: ${argument}`);
  }
  return options;
}

async function main(argumentsList = process.argv.slice(2)) {
  const [command, ...rest] = argumentsList;
  if (!command || command === '--help' || command === '-h' || command === 'help') {
    process.stdout.write(helpText());
    return 0;
  }
  if (command === 'status') {
    const options = parseStatusArguments(rest);
    const status = readStatus(options);
    if (options.json) process.stdout.write(`${JSON.stringify(status, null, 2)}\n`);
    else process.stdout.write(status.qualified

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Pass a value immediately after the flag (e.g. `<flag> <value>`); the value was missing or consumed as another flag.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered when nasiko.js rejects the current invocation: Missing value for --install-dir.

Common situations: Occurs while running scripts/nasiko.js with invalid arguments, missing flags, or a failing external dependency; the guard at scripts/nasiko.js:93 aborts the command with this message.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/cade4175ec9b4cac. Report an issue: GitHub.