{"record":{"id":"0f1fb8da97253433","repo":"affaan-m/ECC","slug":"executable-override-must-be-an-absolute-path-ex","errorCode":null,"errorMessage":"${EXECUTABLE_OVERRIDE} must be an absolute path explicitly configured by the operator.","messagePattern":"(.+?) must be an absolute path explicitly configured by the operator\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":200,"sourceCode":"      ...withoutJson,\n    ]),\n  });\n}\n\nfunction resolveItoExecutable(environment = process.env) {\n  const configured = environment[EXECUTABLE_OVERRIDE]?.trim();\n  if (!configured) {\n    throw new Error([\n      \"The canonical ito-compute-cli is unpublished and ECC will not resolve\",\n      `a credential-bearing \"ito\" executable from PATH. Build it from`,\n      `${CANONICAL_REPOSITORY.replace(/\\.git$/, \"\")}/${CANONICAL_PACKAGE_PATH},`,\n      \"run npm ci and npm run check, then set\",\n      `${EXECUTABLE_OVERRIDE} to the explicit absolute dist/bin/ito.js path.`,\n    ].join(\" \"));\n  }\n\n  if (!path.isAbsolute(configured)) {\n    throw new Error(\n      `${EXECUTABLE_OVERRIDE} must be an absolute path explicitly configured by the operator.`\n    );\n  }\n  return assertUsableExecutable(configured);\n}\n\nfunction assertUsableExecutable(candidate) {\n  let canonicalCandidate;\n  try {\n    canonicalCandidate = fs.realpathSync.native(candidate);\n  } catch {\n    throw new Error(\n      `${EXECUTABLE_OVERRIDE} does not point to a readable local Itô CLI file.`\n    );\n  }\n  if (!isCanonicalItoEntry(canonicalCandidate)) {\n    throw new Error(\n      `${EXECUTABLE_OVERRIDE} must point to the canonical dist/bin/ito.js entry.`","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ito.js#L182-L218","documentation":"Thrown by resolveItoExecutable at scripts/ito.js:199-203 when ECC_ITO_CLI_EXECUTABLE is set and non-empty but path.isAbsolute returns false. ECC requires the operator to name the canonical entry by absolute path so PATH lookup, cwd-relative resolution, and symlinked shims cannot slip a different binary into the credential-bearing invocation. Relative paths and '~'-prefixed paths both fail (Node does not expand ~).","triggerScenarios":"`ECC_ITO_CLI_EXECUTABLE=dist/bin/ito.js ecc ito status`; `ECC_ITO_CLI_EXECUTABLE=~/ito/dist/bin/ito.js ecc ito status` (tilde is literal); any non-absolute value.","commonSituations":"Operator sets the env var from inside the package directory using a relative path; or uses `~` thinking Node will expand it; or a wrapper script captures the value via `pwd`-relative logic that breaks when invoked from elsewhere.","solutions":["Set an absolute path: `export ECC_ITO_CLI_EXECUTABLE=\"$HOME/ito-cloud-runtime/cli/ito-compute-cli/dist/bin/ito.js\"`.","If you must compute it dynamically, resolve at export time: `export ECC_ITO_CLI_EXECUTABLE=\"$(cd \"$PKG_DIR\" && pwd)/dist/bin/ito.js\"`.","Avoid `~` in the value — expand `$HOME` explicitly instead."],"exampleFix":"// before\n$ export ECC_ITO_CLI_EXECUTABLE=dist/bin/ito.js\n// after\n$ export ECC_ITO_CLI_EXECUTABLE=\"$HOME/ito-cloud-runtime/cli/ito-compute-cli/dist/bin/ito.js\"","handlingStrategy":"validation","validationCode":"const path = require('path');\nfunction assertExecutableAbsolute(env) {\n  const v = (env.ECC_ITO_CLI_EXECUTABLE || '').trim();\n  if (!v) throw new Error('ECC_ITO_CLI_EXECUTABLE unset');\n  if (!path.isAbsolute(v)) throw new Error(`ECC_ITO_CLI_EXECUTABLE must be absolute: ${v}`);\n  return v;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use $HOME (not ~) when constructing the path for export.","Compute the path at export time via $(pwd) or node path.resolve, not relative literals.","Lint shell rc files for any tilde-prefixed ECC_ITO_CLI_EXECUTABLE assignment."],"tags":["cli","ito","validation","path","environment","security"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}