aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--thallium-frontend/vite.config.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/thallium-frontend/vite.config.ts b/thallium-frontend/vite.config.ts
index 46cab18..0c0862f 100644
--- a/thallium-frontend/vite.config.ts
+++ b/thallium-frontend/vite.config.ts
@@ -2,8 +2,14 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import * as child from "child_process";
-const commitHash = child.execSync("git rev-parse --short HEAD")
- .toString().replace(/\n$/, "");
+let commitHash = "unknown";
+
+try {
+ commitHash = child.execSync("git rev-parse --short HEAD")
+ .toString().replace(/\n$/, "");
+} catch (e) {
+ console.error("Failed to get commit hash");
+}
// https://vitejs.dev/config/
export default defineConfig({