fix logging and crash reports on Windows
"-H=windowsgui" disables stdout on Windows, and the io.Multiwriter used
for logging had stdout as it's first entry, which failed and caused
logging and line caching to be skipped. stdout is now removed from
the multiwriter in this situation. Other portion of the issue was
because crash reports had colons in their names, which Windows
doesn't like. Fixes #168.
This commit is contained in:
@@ -27,7 +27,11 @@ func logOutput() (closeFunc func(), err error) {
|
||||
closeFunc = func() {}
|
||||
return
|
||||
}
|
||||
writers = append(writers, colorStripper{f})
|
||||
if PLATFORM == "windows" {
|
||||
writers = []io.Writer{colorStripper{lineCache}, colorStripper{f}}
|
||||
} else {
|
||||
writers = append(writers, colorStripper{f})
|
||||
}
|
||||
closeFunc = func() {
|
||||
w.Close()
|
||||
<-wExit
|
||||
|
||||
Reference in New Issue
Block a user