diff --git a/proc_master.go b/proc_master.go index 3d2686a..a991c60 100644 --- a/proc_master.go +++ b/proc_master.go @@ -90,11 +90,13 @@ func (mp *master) checkBinary() error { mp.binHash = hash.Sum(nil) f.Close() //test bin<->tmpbin moves - if err := move(tmpBinPath, mp.binPath); err != nil { - return fmt.Errorf("cannot move binary (%s)", err) - } - if err := move(mp.binPath, tmpBinPath); err != nil { - return fmt.Errorf("cannot move binary back (%s)", err) + if mp.Config.Fetcher != nil { + if err := move(tmpBinPath, mp.binPath); err != nil { + return fmt.Errorf("cannot move binary (%s)", err) + } + if err := move(mp.binPath, tmpBinPath); err != nil { + return fmt.Errorf("cannot move binary back (%s)", err) + } } return nil }