1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-11-23 21:44:40 +02:00

Update golangci integration (#637)

* Update golangci integration

* Fix newly discovered errcheck complaints

* Increase timeout value
This commit is contained in:
Frederik Ring
2025-09-09 20:50:46 +02:00
committed by GitHub
parent cbaa17d048
commit 746b8f71f9
13 changed files with 99 additions and 90 deletions

View File

@@ -177,8 +177,12 @@ func (s *script) runLabeledCommands(label string) error {
s.logger.Info(fmt.Sprintf("Running %s command %s for container %s", label, cmd, strings.TrimPrefix(c.Names[0], "/")))
stdout, stderr, err := s.exec(c.ID, cmd, user)
if s.c.ExecForwardOutput {
os.Stderr.Write(stderr)
os.Stdout.Write(stdout)
if _, err := os.Stderr.Write(stderr); err != nil {
return errwrap.Wrap(err, "error writing to stderr")
}
if _, err := os.Stdout.Write(stdout); err != nil {
return errwrap.Wrap(err, "error writing to stdout")
}
}
if err != nil {
return errwrap.Wrap(err, "error executing command")