mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-13 23:51:20 +03: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
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue