From 9eb72c5db04f287af137d17bf3bdbf53981ab3a7 Mon Sep 17 00:00:00 2001 From: zyx Date: Mon, 16 Mar 2020 21:59:30 +0800 Subject: [PATCH] fix misuse of variables --- worker/rsync_provider.go | 6 +++--- worker/two_stage_rsync_provider.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/worker/rsync_provider.go b/worker/rsync_provider.go index a9fdfa1..7bb6f8e 100644 --- a/worker/rsync_provider.go +++ b/worker/rsync_provider.go @@ -52,13 +52,13 @@ func newRsyncProvider(c rsyncConfig) (*rsyncProvider, error) { provider.rsyncCmd = "rsync" } if c.rsyncEnv == nil { - c.rsyncEnv = map[string]string{} + provider.rsyncEnv = map[string]string{} } if c.username != "" { - c.rsyncEnv["USER"] = c.username + provider.rsyncEnv["USER"] = c.username } if c.password != "" { - c.rsyncEnv["RSYNC_PASSWORD"] = c.password + provider.rsyncEnv["RSYNC_PASSWORD"] = c.password } options := []string{ diff --git a/worker/two_stage_rsync_provider.go b/worker/two_stage_rsync_provider.go index 48fcedc..7447595 100644 --- a/worker/two_stage_rsync_provider.go +++ b/worker/two_stage_rsync_provider.go @@ -71,13 +71,13 @@ func newTwoStageRsyncProvider(c twoStageRsyncConfig) (*twoStageRsyncProvider, er } if c.rsyncEnv == nil { - c.rsyncEnv = map[string]string{} + provider.rsyncEnv = map[string]string{} } if c.username != "" { - c.rsyncEnv["USER"] = c.username + provider.rsyncEnv["USER"] = c.username } if c.password != "" { - c.rsyncEnv["RSYNC_PASSWORD"] = c.password + provider.rsyncEnv["RSYNC_PASSWORD"] = c.password } if c.rsyncCmd == "" { provider.rsyncCmd = "rsync"