{"record":{"id":"64642923e9d66e7c","repo":"affaan-m/ECC","slug":"ecc-nasiko-cli-executable-must-be-an-absolute-path","errorCode":null,"errorMessage":"ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.","messagePattern":"ECC_NASIKO_CLI_EXECUTABLE must be an absolute path\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/nasiko.js","lineNumber":75,"sourceCode":"function defaultExecutablePath() {\n  const normalized = normalizePlatform();\n  if (normalized.os === 'windows') {\n    return process.env.LOCALAPPDATA\n      ? path.join(process.env.LOCALAPPDATA, 'nasiko', 'bin', normalized.binaryName)\n      : null;\n  }\n  return path.join(os.homedir(), '.local', 'bin', normalized.binaryName);\n}\n\nfunction resolveExecutable(options = {}) {\n  const configured = process.env.ECC_NASIKO_CLI_EXECUTABLE;\n  const normalized = normalizePlatform();\n  const candidate = options.installDir\n    ? path.join(validateInstallDirectory(options.installDir), normalized.binaryName)\n    : configured || defaultExecutablePath();\n  if (!candidate) return null;\n  if (!path.isAbsolute(candidate)) {\n    throw new Error('ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.');\n  }\n  return candidate;\n}\n\nfunction readStatus(options = {}) {\n  const executable = resolveExecutable(options);\n  if (!executable) return { installed: false, qualified: false, version: null, executable: null };\n  return inspectInstalledNasiko(executable);\n}\n\nfunction parseStatusArguments(argumentsList) {\n  let options = { installDir: undefined, json: false };\n  for (let index = 0; index < argumentsList.length; index += 1) {\n    const argument = argumentsList[index];\n    if (argument === '--json') options = { ...options, json: true };\n    else if (argument === '--install-dir') {\n      const value = argumentsList[index + 1];\n      if (!value || value.startsWith('--')) throw new Error('Missing value for --install-dir.');","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/nasiko.js#L57-L93","documentation":"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.","triggerScenarios":"Triggered when nasiko.js rejects the current invocation: ECC_NASIKO_CLI_EXECUTABLE must be an absolute path.","commonSituations":"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.","solutions":["Fix the path/URL/value so it satisfies the validation rule stated in the message."],"exampleFix":null,"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-14T05:17:10.506Z"}