Browse Source

close file

pull/78/head
Chris Mague 6 years ago
parent
commit
9f3b054c63
  1. 9
      plugin.go

9
plugin.go

@ -189,8 +189,15 @@ func (p Plugin) Exec() error {
"error": err,
}).Fatal("Failed to execute a command")
}
f, _ := os.Create(c.Ofile)
f, outferr := os.Create(c.Ofile)
if outferr != nil {
logrus.WithFields(logrus.Fields{
"command": strings.Join(c.Tfcmd.Args, " "),
"error": outferr,
}).Fatal("Failed to write file")
}
f.Write(out)
f.Close()
}
}

Loading…
Cancel
Save