{"record":{"id":"f380301ff518d967","repo":"diegosouzapw/OmniRoute","slug":"git-tag-not-found-targettag","errorCode":null,"errorMessage":"Git tag not found: ${targetTag}","messagePattern":"Git tag not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/system/autoUpdate.ts","lineNumber":278,"sourceCode":"      composeCommand: null,\n    };\n  }\n\n  return { supported: true, reason: null, composeCommand };\n}\n\nexport async function ensureGitTagExists(\n  targetTag: string,\n  execFileImpl: ExecFileLike = execFileAsync,\n  cwd = PROJECT_ROOT\n): Promise<void> {\n  try {\n    await execFileImpl(\"git\", [\"rev-parse\", \"-q\", \"--verify\", `refs/tags/${targetTag}`], {\n      timeout: 10_000,\n      cwd,\n    });\n  } catch {\n    throw new Error(`Git tag not found: ${targetTag}`);\n  }\n}\n\nexport function buildNpmUpdateScript(latest: string): string {\n  return [\n    \"set -eu\",\n    // --include=optional keeps the optionalDependencies (better-sqlite3, keytar,\n    // tls-client, and the llmlingua SLM stack) installed on every update so an\n    // `omit=optional` config / .npmrc cannot silently drop them.\n    `npm install -g omniroute@${latest} --include=optional --ignore-scripts --legacy-peer-deps`,\n    \"if command -v pm2 >/dev/null 2>&1; then\",\n    \"  pm2 restart omniroute || true\",\n    \"fi\",\n    `echo \\\"[AutoUpdate] Successfully updated to v${latest}.\\\"`,\n  ].join(\"\\n\");\n}\n\nexport function buildSourceUpdateScript(latest: string, gitRemote = \"origin\"): string {","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/system/autoUpdate.ts#L260-L296","documentation":"Error \"Git tag not found: ${targetTag}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/system/autoUpdate.ts:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}