diff --git a/src/lib/version.ts b/src/lib/version.ts index 07c2e148..7e839065 100644 --- a/src/lib/version.ts +++ b/src/lib/version.ts @@ -1,13 +1,13 @@ // TODO: implement version checking against the API at https://zipline.diced.sh import { version } from '../../package.json'; +import { execSync } from 'child_process'; export function gitSha() { const envValue = process.env.ZIPLINE_GIT_SHA; if (envValue && envValue !== 'unknown') return envValue; try { - const { execSync } = require('child_process'); const commitHash = execSync('git rev-parse --short HEAD').toString().trim(); return commitHash; } catch (error) {