File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,20 @@ import { VERSION } from "../version";
88/**
99 * Get base telemetry properties included with all events
1010 */
11+ function resolveGitDescribe ( value : unknown ) : string {
12+ if ( typeof value === "object" && value !== null && "git_describe" in value ) {
13+ const describe = ( value as Record < string , unknown > ) . git_describe ;
14+ if ( typeof describe === "string" ) {
15+ return describe ;
16+ }
17+ }
18+
19+ return "unknown" ;
20+ }
21+
1122export function getBaseTelemetryProperties ( ) : BaseTelemetryProperties {
1223 return {
13- version : String ( VERSION . git_describe ) ,
24+ version : resolveGitDescribe ( VERSION ) ,
1425 platform : window . api ?. platform || "unknown" ,
1526 electronVersion : window . api ?. versions ?. electron || "unknown" ,
1627 } ;
Original file line number Diff line number Diff line change @@ -125,7 +125,9 @@ export const TOOL_DEFINITIONS = {
125125 create : z
126126 . boolean ( )
127127 . optional ( )
128- . describe ( "Legacy compatibility; files are created automatically when missing, so this flag is ignored." ) ,
128+ . describe (
129+ "Legacy compatibility; files are created automatically when missing, so this flag is ignored."
130+ ) ,
129131 before : z
130132 . string ( )
131133 . min ( 1 )
You can’t perform that action at this time.
0 commit comments