git might not be available

This commit is contained in:
Chris Wanstrath 2025-10-10 14:57:34 -07:00
parent d7dab69405
commit 0b2f73eafa

View File

@ -13,5 +13,9 @@ export const NOSE_ROOT_BIN = join(NOSE_DIR, DEFAULT_PROJECT, "bin")
export const NOSE_STARTED = Date.now()
export const GIT_SHA = (await $`git rev-parse --short HEAD`.text()).trim()
; (globalThis as any).GIT_SHA = GIT_SHA
let gitSHA = "<development>"
try { gitSHA = (await $`git rev-parse --short HEAD`.text()).trim() } catch { }
export const GIT_SHA = gitSHA
; (globalThis as any).GIT_SHA = GIT_SHA
export const BUN_BIN = untilde("~/.bun/bin/bun")