{"record":{"id":"4d51b40a96d1adfa","repo":"JuliusBrussee/caveman","slug":"cave-setup-timeout-must-be-a-positive-integer-got","errorCode":null,"errorMessage":"CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.stringify(raw)})","messagePattern":"CAVE_SETUP_TIMEOUT must be a positive integer \\(got (.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/index.ts","lineNumber":1971,"sourceCode":"type InstalledBinary = {\n  name: string;\n  path: string;\n  sha256: string;\n  status: \"installed\" | \"already installed\";\n};\n\ntype BinaryInstallManifest = {\n  release: string;\n  artifacts: Record<string, string>;\n};\n\nconst INSTALL_BINARIES = GO_BINARIES.map((binary) => binary.name);\n\nfunction setupTimeoutSeconds(): number {\n  const raw = process.env.CAVE_SETUP_TIMEOUT ?? \"300\";\n  const parsed = Number(raw);\n  if (!Number.isInteger(parsed) || parsed <= 0) {\n    throw new Error(`CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.stringify(raw)})`);\n  }\n  return parsed;\n}\n\nexport function setupPlatform(\n  os: NodeJS.Platform = process.platform,\n  nodeArch: string = process.arch,\n): { os: string; arch: string } {\n  const arch = nodeArch === \"x64\" ? \"amd64\" : nodeArch;\n  if (!(os === \"darwin\" || os === \"linux\" || os === \"win32\") ||\n      !(arch === \"arm64\" || arch === \"amd64\")) {\n    throw new Error(OFF_STATES.unsupportedPlatform(os, arch).line);\n  }\n  return { os, arch };\n}\n\nexport function binaryInstallFilename(name: string, os: string = process.platform): string {\n  return os === \"win32\" ? `${name}.exe` : name;","sourceCodeStart":1953,"sourceCodeEnd":1989,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/cli/src/index.ts#L1953-L1989","documentation":"Error \"CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.stringify(raw)})\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/cli/src/index.ts:1971 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set CAVE_SETUP_TIMEOUT to a positive integer (seconds)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}