affaan-m/ECC · error

Unknown Nasiko status argument: ${argument}

Error message

Unknown Nasiko status argument: ${argument}

What it means

Thrown by parseStatusArguments when an argument is neither --json, --install-dir, nor that flag's value. The status subcommand accepts no other options, so anything else is rejected as unknown.

Source

Thrown at scripts/nasiko.js:96

}

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
      ? `Qualified Nasiko ${status.version} is installed at ${status.executable}.\n`
      : status.installed
        ? `An unqualified Nasiko file exists at ${status.executable}; it was not executed.\n`

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Remove or correct the unrecognized input; run the command with --help to list valid arguments/commands.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered when nasiko.js rejects the current invocation: Unknown Nasiko status argument: <value>

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


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