affaan-m/ECC · error

ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.

Error message

ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.

What it means

resolveExecutable validates the ECC_NASIKO_CLI_EXECUTABLE override: when set, it must be an absolute path because it is joined/spawned directly. A relative path here would resolve against an unpredictable working directory.

Source

Thrown at scripts/nasiko.js:75

function defaultExecutablePath() {
  const normalized = normalizePlatform();
  if (normalized.os === 'windows') {
    return process.env.LOCALAPPDATA
      ? path.join(process.env.LOCALAPPDATA, 'nasiko', 'bin', normalized.binaryName)
      : null;
  }
  return path.join(os.homedir(), '.local', 'bin', normalized.binaryName);
}

function resolveExecutable(options = {}) {
  const configured = process.env.ECC_NASIKO_CLI_EXECUTABLE;
  const normalized = normalizePlatform();
  const candidate = options.installDir
    ? path.join(validateInstallDirectory(options.installDir), normalized.binaryName)
    : configured || defaultExecutablePath();
  if (!candidate) return null;
  if (!path.isAbsolute(candidate)) {
    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.');

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Fix the path/URL/value so it satisfies the validation rule stated in the message.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered when nasiko.js rejects the current invocation: ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.

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


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