Log error if pipe deletion fails

Hopefully this helps to shed some light on #42.
This commit is contained in:
Conrad Hoffmann 2020-03-06 09:56:31 +01:00
parent aecd42dbb0
commit 7d7e33dc93
1 changed files with 5 additions and 1 deletions

View File

@ -234,7 +234,11 @@ func freeipmiOutput(cmd string, target ipmiTarget, arg ...string) ([]byte, error
if err != nil {
return nil, err
}
defer os.Remove(pipe)
defer func() {
if err := os.Remove(pipe); err != nil {
log.Errorf("Error deleting named pipe: %s", err)
}
}()
args := []string{"--config-file", pipe}
if !targetIsLocal(target.host) {