Suppress error logs when killing process on Windows

There is a string check here to suppress the failure logs due to this reason but on Windows, the string is different ("exit status 1").
This commit is contained in:
Brandon 2025-02-04 17:12:47 -08:00 committed by Jesse Duffield
parent 7731311674
commit ed9519a241

View file

@ -277,8 +277,10 @@ func (self *ViewBufferManager) NewCmdTask(start func() (*exec.Cmd, io.Reader), p
refreshViewIfStale()
if err := cmd.Wait(); err != nil {
// it's fine if we've killed this program ourselves
if !strings.Contains(err.Error(), "signal: killed") {
select {
case <-opts.Stop:
// it's fine if we've killed this program ourselves
default:
self.Log.Errorf("Unexpected error when running cmd task: %v; Failed command: %v %v", err, cmd.Path, cmd.Args)
}
}