{"record":{"id":"9532f7d6fa0ff767","repo":"affaan-m/ECC","slug":"nasiko-executable-must-be-a-regular-file-not-a-sy","errorCode":null,"errorMessage":"Nasiko executable must be a regular file, not a symlink.","messagePattern":"Nasiko executable must be a regular file, not a symlink\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/nasiko-release.js","lineNumber":210,"sourceCode":"    return bytes;\n  } finally { fs.closeSync(descriptor); }\n}\n\nfunction readMetadata(executable) {\n  try {\n    const bytes = readBoundedRegularFile(metadataPathFor(executable), MAX_METADATA_BYTES);\n    return bytes ? JSON.parse(bytes.toString('utf8')) : null;\n  }\n  catch (_error) { return null; }\n}\n\nfunction inspectInstalledNasiko(executable, resolveRelease = getQualifiedRelease) {\n  if (!executable) return { installed: false, qualified: false, version: null, executable: null };\n  let binary;\n  try { binary = readBoundedRegularFile(executable, MAX_BINARY_BYTES); }\n  catch (error) {\n    if (error.code === 'ENOENT') return { installed: false, qualified: false, version: null, executable };\n    if (error.code === 'ELOOP') throw new Error('Nasiko executable must be a regular file, not a symlink.');\n    throw error;\n  }\n  if (!binary) return { installed: true, qualified: false, version: null, executable, binaryDigest: null, metadataPath: metadataPathFor(executable) };\n  const binaryDigest = digestBytes(binary);\n  const metadata = readMetadata(executable);\n  let release = null;\n  try { if (metadata) release = resolveRelease(metadata.version, metadata.platform, metadata.architecture); } catch (_error) { release = null; }\n  const qualified = Boolean(release\n    && metadata.installedPath === executable\n    && metadata.manifestDigest === release.manifestDigest\n    && metadata.binaryDigest === release.binaryDigest\n    && binaryDigest === release.binaryDigest\n    && metadata.license === release.license\n    && metadata.sourceUrl === release.sourceUrl);\n  return { installed: true, qualified, version: qualified ? metadata.version : null, executable, binaryDigest, metadataPath: metadataPathFor(executable) };\n}\n\nfunction writeMetadataExclusive(metadataPath, metadata) {","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/nasiko-release.js#L192-L228","documentation":"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.","triggerScenarios":"Thrown at scripts/lib/nasiko-release.js:210 when the library encounters an invalid state.","commonSituations":"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.","solutions":["Provide a value that satisfies the validation: Nasiko executable must be a regular file, not a symlink.","Check the calling command or configuration for the reported field and correct it, then retry.","Run the command with --help to review the expected input shape and allowed values."],"exampleFix":"Correct the invalid input so that the following holds: Nasiko executable must be a regular file, not a symlink.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}