@@ -872,17 +872,19 @@ function handleMacCrashFileRead(err: NodeJS.ErrnoException | undefined | null, d
872
872
data = data . replace ( / 0 x 1 ........ \+ 0 / g, "" ) ;
873
873
874
874
// Get rid of the process names on each line and just add it to the start.
875
- const process1 : string = "cpptools-srv" ;
876
- const process2 : string = "cpptools" ;
877
- if ( data . includes ( process1 ) ) {
878
- data = data . replace ( new RegExp ( process1 + "\\s+" , "g" ) , "" ) ;
879
- data = `${ process1 } \t${ binaryVersion } \n${ data } ` ;
880
- } else if ( data . includes ( process2 ) ) {
881
- data = data . replace ( new RegExp ( process2 + "\\s+" , "g" ) , "" ) ;
882
- data = `${ process2 } \t${ binaryVersion } \n${ data } ` ;
883
- } else {
884
- // Not expected, but just in case.
885
- data = `cpptools?\t${ binaryVersion } \n${ data } ` ;
875
+ const processNames : string [ ] = [ "cpptools-srv" , "cpptools-wordexp" , "cpptools" ] ;
876
+ let processNameFound : boolean = false ;
877
+ for ( const processName of processNames ) {
878
+ if ( data . includes ( processName ) ) {
879
+ data = data . replace ( new RegExp ( processName + "\\s+" , "g" ) , "" ) ;
880
+ data = `${ processName } \t${ binaryVersion } \n${ data } ` ;
881
+ processNameFound = true ;
882
+ break ;
883
+ }
884
+ }
885
+ if ( ! processNameFound ) {
886
+ // Not expected, but just in case a new binary gets added.
887
+ data = `cpptools???\t${ binaryVersion } \n${ data } ` ;
886
888
}
887
889
888
890
// Remove runtime lines because they can be different on different machines.
0 commit comments