{"record":{"id":"8aaedd38930c5004","repo":"stablyai/orca","slug":"status-detail-cli-registration-is-unavailabl","errorCode":null,"errorMessage":"${status.detail ?? 'CLI registration is unavailable on this build.'}","messagePattern":"\\$\\{status\\.detail \\?\\? 'CLI registration is unavailable on this build\\.'\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/cli/cli-installer.ts","lineNumber":186,"sourceCode":"      }\n    }\n\n    const spec = await this.resolveActiveInstallSpec(defaultSpec, launcherPath)\n    const baseStatus =\n      spec.installMethod === 'symlink'\n        ? await this.inspectSymlink(spec.commandPath, launcherPath)\n        : this.isLinuxAppImage()\n          ? await this.inspectAppImageWrapper(spec.commandPath, launcherPath)\n          : await this.inspectWindowsWrapper(spec.commandPath, launcherPath)\n    const pathDirectory = dirname(spec.commandPath)\n    const pathProbe = await this.probePathConfiguration(pathDirectory)\n    return this.withPathInfo(baseStatus, pathDirectory, pathProbe)\n  }\n\n  async install(): Promise<CliInstallStatus> {\n    const status = await this.getStatus()\n    if (!status.supported || !status.commandPath || !status.launcherPath || !status.installMethod) {\n      throw new Error(status.detail ?? 'CLI registration is unavailable on this build.')\n    }\n    if (status.state === 'conflict') {\n      throw new Error(`Refusing to replace non-Orca command at ${status.commandPath}.`)\n    }\n\n    // eslint-disable-next-line unicorn/prefer-ternary -- Why: the install path performs async side effects and is easier to audit as an explicit branch than as an awaited ternary.\n    if (status.installMethod === 'symlink') {\n      await this.installSymlink(status)\n      await this.removeLegacyLinuxCommandIfManaged(status.launcherPath)\n    } else if (this.isLinuxAppImage()) {\n      await this.installAppImageWrapper(status.commandPath, status.launcherPath)\n      await this.removeLegacyLinuxCommandIfManaged(status.launcherPath)\n    } else if (this.isWindowsPackagedBundledCommand(status.commandPath, status.launcherPath)) {\n      // Why: packaged Windows already ships resources/bin/orca.exe; registration only owns the PATH entry.\n    } else {\n      // Why: the Windows wrapper dir is user-writable (%LOCALAPPDATA%), so mkdir here can't hit EACCES.\n      await mkdir(dirname(status.commandPath), { recursive: true })\n      await this.installWindowsWrapper(status.commandPath, status.launcherPath)","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/cli/cli-installer.ts#L168-L204","documentation":"Thrown by CliInstaller.install() when getStatus() returns a status where supported is false, or commandPath/launcherPath/installMethod are missing. The error message uses status.detail if available (e.g., launcher missing, dev mode), otherwise falls back to a generic message.","triggerScenarios":"Calling install() on a platform or build where the CLI launcher is not available. getStatus() returns state 'unsupported' because: the AppImage file is missing, the packaged launcher binary is absent, or development mode lacks a generated launcher.","commonSituations":"AppImage was moved after initial run (appImagePath is stale). Packaged build is corrupted (resources/bin/orca missing). Running install() in an unsupported environment (e.g., a CI container without electron). Dev launcher file was deleted from userData.","solutions":["Check status.detail and status.unsupportedReason for the specific cause.","If AppImage: move it back to its original location or re-download.","If packaged build is corrupted: reinstall Orca.","If in dev mode: run the dev launcher generation step (ensureDevLauncher) before calling install."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const status = await installer.getStatus()\nif (!status.supported || !status.commandPath || !status.launcherPath || !status.installMethod) {\n  // Do not call install(); show status.detail to the user\n  showError(status.detail ?? 'CLI registration is unavailable on this build.')\n  return\n}","typeGuard":null,"tryCatchPattern":"try {\n  await installer.install()\n} catch (error) {\n  if (error instanceof Error && error.message.includes('CLI registration is unavailable')) {\n    // Show build/platform guidance from status.detail\n  } else { throw error }\n}","preventionTips":["Always call getStatus() before install() and check 'supported'.","Keep AppImage files in their original location after first run.","Verify the packaged build is complete before deploying."],"tags":["cli-installer","installation","platform","launcher"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}