{"record":{"id":"10983688cc427671","repo":"slopus/happy","slug":"daemon-uninstallation-is-currently-only-supported","errorCode":null,"errorMessage":"Daemon uninstallation is currently only supported on macOS","messagePattern":"Daemon uninstallation is currently only supported on macOS","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/happy-cli/src/daemon/uninstall.ts","lineNumber":6,"sourceCode":"import { logger } from '@/ui/logger';\nimport { uninstall as uninstallMac } from './mac/uninstall';\n\nexport async function uninstall(): Promise<void> {\n    if (process.platform !== 'darwin') {\n        throw new Error('Daemon uninstallation is currently only supported on macOS');\n    }\n    \n    if (process.getuid && process.getuid() !== 0) {\n        throw new Error('Daemon uninstallation requires sudo privileges. Please run with sudo.');\n    }\n    \n    logger.info('Uninstalling Happy CLI daemon for macOS...');\n    await uninstallMac();\n}","sourceCodeStart":1,"sourceCodeEnd":15,"githubUrl":"https://github.com/slopus/happy/blob/b824cd0a4681d41af631a8e422a813873e4455b0/packages/happy-cli/src/daemon/uninstall.ts#L1-L15","documentation":"uninstall() mirrors install(): it only supports macOS (launchd removal via ./mac/uninstall) and throws on any other platform before doing anything.","triggerScenarios":"Running `happy daemon uninstall` (or equivalent) on Linux or Windows.","commonSituations":"User migrates off the daemon on a Linux machine following macOS instructions; cleanup script in a non-mac CI tries to uninstall; user confused about which platform the daemon was installed on.","solutions":["Run the uninstall on the macOS machine where the daemon was installed","On Linux/Windows, remove any manually created daemon artifacts yourself (launchd is macOS-only, so none should exist)","Ignore the error on non-mac platforms — nothing was installed to remove","Check for stray background happy processes and kill them manually instead"],"exampleFix":"// before\nawait uninstall(); // throws on linux/windows\n// after\nif (process.platform === 'darwin') {\n  await uninstall();\n}","handlingStrategy":"validation","validationCode":"if (process.platform !== 'darwin') {\n  console.log('Daemon uninstall is macOS-only; nothing to remove.');\n} else {\n  await uninstall();\n}","typeGuard":null,"tryCatchPattern":"try {\n  await uninstall();\n} catch (err) {\n  if (err.message.includes('only supported on macOS')) {\n    console.log('No macOS daemon here; skipping uninstall.');\n  } else throw err;\n}","preventionTips":["Only run daemon uninstall on the macOS machine where it was installed","Check process.platform before invoking uninstall","Don't wire uninstall into non-mac cleanup scripts","For non-mac cleanup, kill stray happy processes directly"],"tags":["daemon","platform","unsupported"],"backgroundTag":"platform-not-supported","analyzedSha":"b824cd0a4681d41af631a8e422a813873e4455b0","analyzedAt":"2026-08-31T23:12:36.205Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}