The best way to control Claude Code, Codex and more from any computer or phone
Gate embedded commit hash lookup to packaged desktop builds
- Prefer `T3CODE_COMMIT_HASH` when set - Return `null` for unpackaged desktop runs instead of reading embedded metadata
Julius Marminge committed
Mar 2, 2026 at 18:29 UTC
8a2f2a5c2b057f62473172dae3e2467afb8db394
1 file changed
+13
-2
apps/desktop/src/main.ts
+13
-2
@@ -115,8 +115,19 @@ function resolveAboutCommitHash(): string | null {
115
return aboutCommitHashCache;
116
}
117
118
- aboutCommitHashCache =
119
- normalizeCommitHash(process.env.T3CODE_COMMIT_HASH) ?? resolveEmbeddedCommitHash();
118
+ const envCommitHash = normalizeCommitHash(process.env.T3CODE_COMMIT_HASH);
119
+ if (envCommitHash) {
120
+ aboutCommitHashCache = envCommitHash;
121
+ return aboutCommitHashCache;
122
+ }
123
+
124
+ // Only packaged builds are required to expose commit metadata.
125
+ if (!app.isPackaged) {
126
+ aboutCommitHashCache = null;
127
+ return aboutCommitHashCache;
128
+ }
129
+
130
+ aboutCommitHashCache = resolveEmbeddedCommitHash();
131
132
return aboutCommitHashCache;
133
}