affaan-m/ECC · error · Error

Nasiko executable must be a regular file, not a symlink.

Error message

Nasiko executable must be a regular file, not a symlink.

What it means

readBoundedRegularFile lstat'ed the purported Nasiko executable and it is not a regular file (e.g. a symlink or fifo). The installer only reads genuine regular files to prevent TOCTOU and symlink-target substitution when verifying binary digests.

Source

Thrown at scripts/lib/nasiko-release.js:210

    return bytes;
  } finally { fs.closeSync(descriptor); }
}

function readMetadata(executable) {
  try {
    const bytes = readBoundedRegularFile(metadataPathFor(executable), MAX_METADATA_BYTES);
    return bytes ? JSON.parse(bytes.toString('utf8')) : null;
  }
  catch (_error) { return null; }
}

function inspectInstalledNasiko(executable, resolveRelease = getQualifiedRelease) {
  if (!executable) return { installed: false, qualified: false, version: null, executable: null };
  let binary;
  try { binary = readBoundedRegularFile(executable, MAX_BINARY_BYTES); }
  catch (error) {
    if (error.code === 'ENOENT') return { installed: false, qualified: false, version: null, executable };
    if (error.code === 'ELOOP') throw new Error('Nasiko executable must be a regular file, not a symlink.');
    throw error;
  }
  if (!binary) return { installed: true, qualified: false, version: null, executable, binaryDigest: null, metadataPath: metadataPathFor(executable) };
  const binaryDigest = digestBytes(binary);
  const metadata = readMetadata(executable);
  let release = null;
  try { if (metadata) release = resolveRelease(metadata.version, metadata.platform, metadata.architecture); } catch (_error) { release = null; }
  const qualified = Boolean(release
    && metadata.installedPath === executable
    && metadata.manifestDigest === release.manifestDigest
    && metadata.binaryDigest === release.binaryDigest
    && binaryDigest === release.binaryDigest
    && metadata.license === release.license
    && metadata.sourceUrl === release.sourceUrl);
  return { installed: true, qualified, version: qualified ? metadata.version : null, executable, binaryDigest, metadataPath: metadataPathFor(executable) };
}

function writeMetadataExclusive(metadataPath, metadata) {

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Provide a value that satisfies the validation: Nasiko executable must be a regular file, not a symlink.
  2. Check the calling command or configuration for the reported field and correct it, then retry.
  3. Run the command with --help to review the expected input shape and allowed values.

Example fix

Correct the invalid input so that the following holds: Nasiko executable must be a regular file, not a symlink.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/lib/nasiko-release.js:210 when the library encounters an invalid state.

Common situations: Raised when input validation fails because: Nasiko executable must be a regular file, not a symlink.. Typically caused by a missing, malformed, or out-of-range argument or configuration value.


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