Roo-Code/packages/build/src/git.ts
2025-05-21 23:16:43 -07:00

13 lines
238 B
TypeScript

import { execSync } from "child_process"
export function getGitSha() {
let gitSha: string | undefined = undefined
try {
gitSha = execSync("git rev-parse HEAD").toString().trim()
} catch (_e) {
// Do nothing.
}
return gitSha
}