mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Handle clang-format's stderr more nicely.
This commit is contained in:
1 parent
ddba103284
commit
7e18d9b549
2 files changed
+11
-13
No files matched your search
@@ -8,6 +8,7 @@ import (
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/google/puffs/lang/ast"
|
||||
"github.com/google/puffs/lang/check"
|
||||
@@ -28,7 +29,9 @@ type Generator interface {
|
||||
|
||||
func Main(g Generator) {
|
||||
if err := main1(g); err != nil {
|
||||
os.Stderr.WriteString(err.Error() + "\n")
|
||||
if _, ok := err.(*exec.ExitError); !ok {
|
||||
os.Stderr.WriteString(err.Error() + "\n")
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user