mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-27 12:32:37 +02:00
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:
parent
7731311674
commit
ed9519a241
@ -277,8 +277,10 @@ func (self *ViewBufferManager) NewCmdTask(start func() (*exec.Cmd, io.Reader), p
|
|||||||
refreshViewIfStale()
|
refreshViewIfStale()
|
||||||
|
|
||||||
if err := cmd.Wait(); err != nil {
|
if err := cmd.Wait(); err != nil {
|
||||||
// it's fine if we've killed this program ourselves
|
select {
|
||||||
if !strings.Contains(err.Error(), "signal: killed") {
|
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)
|
self.Log.Errorf("Unexpected error when running cmd task: %v; Failed command: %v %v", err, cmd.Path, cmd.Args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user