File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,9 @@ func compilerVersion() (version, error) {
357
357
compiler .err = func () error {
358
358
compiler .name = "unknown"
359
359
cc := os .Getenv ("CC" )
360
- out , err := exec .Command (cc , "--version" ).Output ()
360
+ cmd := exec .Command (cc , "--version" )
361
+ cmd .Env = append (cmd .Environ (), "LANG=C" )
362
+ out , err := cmd .Output ()
361
363
if err != nil {
362
364
// Compiler does not support "--version" flag: not Clang or GCC.
363
365
return err
@@ -366,7 +368,9 @@ func compilerVersion() (version, error) {
366
368
var match [][]byte
367
369
if bytes .HasPrefix (out , []byte ("gcc" )) {
368
370
compiler .name = "gcc"
369
- out , err := exec .Command (cc , "-v" ).CombinedOutput ()
371
+ cmd := exec .Command (cc , "-v" )
372
+ cmd .Env = append (cmd .Environ (), "LANG=C" )
373
+ out , err := cmd .CombinedOutput ()
370
374
if err != nil {
371
375
// gcc, but does not support gcc's "-v" flag?!
372
376
return err
You can’t perform that action at this time.
0 commit comments