diff --git a/worker/rsync_provider.go b/worker/rsync_provider.go index 96c5316..a9fdfa1 100644 --- a/worker/rsync_provider.go +++ b/worker/rsync_provider.go @@ -51,6 +51,9 @@ func newRsyncProvider(c rsyncConfig) (*rsyncProvider, error) { if c.rsyncCmd == "" { provider.rsyncCmd = "rsync" } + if c.rsyncEnv == nil { + c.rsyncEnv = map[string]string{} + } if c.username != "" { c.rsyncEnv["USER"] = c.username } diff --git a/worker/two_stage_rsync_provider.go b/worker/two_stage_rsync_provider.go index bbade4b..48fcedc 100644 --- a/worker/two_stage_rsync_provider.go +++ b/worker/two_stage_rsync_provider.go @@ -70,6 +70,9 @@ func newTwoStageRsyncProvider(c twoStageRsyncConfig) (*twoStageRsyncProvider, er }, } + if c.rsyncEnv == nil { + c.rsyncEnv = map[string]string{} + } if c.username != "" { c.rsyncEnv["USER"] = c.username }