From 2c197e2208e64d2432210f4ec13362ee8d2cfe78 Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Tue, 22 Aug 2023 08:40:02 +0200 Subject: [PATCH] protect args --- rsync.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rsync.go b/rsync.go index 74f24a1..476496e 100644 --- a/rsync.go +++ b/rsync.go @@ -4,6 +4,7 @@ import ( "bufio" "bytes" "fmt" + "os" "os/exec" "regexp" "strconv" @@ -69,6 +70,7 @@ func (r *Rsync) Run() error { "--inplace", "--no-inc-recursive", "--info=progress2", + "-s", } if r.Rsh != "" { args = append(args, "--rsh", r.Rsh) @@ -78,6 +80,7 @@ func (r *Rsync) Run() error { "rsync", args..., ) + cmd.Stderr = os.Stderr out, err := cmd.StdoutPipe() if err != nil { return err