etcdctl/command: fix shawdowed error variable

This fixes https://github.com/coreos/etcd/issues/3954.
This commit is contained in:
Gyu-Ho Lee 2015-12-12 04:20:37 -08:00
parent 88aec09ddf
commit bccc602c8f

View File

@ -61,7 +61,7 @@ func handleBackup(c *cli.Context) {
if snapshot != nil {
walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term
newss := snap.New(destSnap)
if err := newss.SaveSnap(*snapshot); err != nil {
if err = newss.SaveSnap(*snapshot); err != nil {
log.Fatal(err)
}
}