diff options
author | Unknwon <u@gogs.io> | 2016-05-12 14:32:28 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-05-12 14:32:28 -0400 |
commit | 7826eae452360913b7c9e476566dc30601270c75 (patch) | |
tree | c0062ef2ed630c280fc4919f6d645a1aee87aed6 /cmd/dump.go | |
parent | 8a2347592d78548a54e35a71eb379ae3b8810bc6 (diff) | |
download | gitea-7826eae452360913b7c9e476566dc30601270c75.tar.gz gitea-7826eae452360913b7c9e476566dc30601270c75.zip |
#3045 fix DEPRECATED Action signature erorr
Diffstat (limited to 'cmd/dump.go')
-rw-r--r-- | cmd/dump.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cmd/dump.go b/cmd/dump.go index 90082667bb..0a2f4e9cba 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -32,7 +32,7 @@ It can be used for backup and capture Gogs server image to send to maintainer`, }, } -func runDump(ctx *cli.Context) { +func runDump(ctx *cli.Context) error { if ctx.IsSet("config") { setting.CustomConf = ctx.String("config") } @@ -68,21 +68,21 @@ func runDump(ctx *cli.Context) { log.Fatalf("Fail to create %s: %v", fileName, err) } - if err := z.AddFile("gogs-repo.zip", reposDump); err !=nil { + if err := z.AddFile("gogs-repo.zip", reposDump); err != nil { log.Fatalf("Fail to include gogs-repo.zip: %v", err) } - if err := z.AddFile("gogs-db.sql", dbDump); err !=nil { + if err := z.AddFile("gogs-db.sql", dbDump); err != nil { log.Fatalf("Fail to include gogs-db.sql: %v", err) } customDir, err := os.Stat(setting.CustomPath) if err == nil && customDir.IsDir() { - if err := z.AddDir("custom", setting.CustomPath); err !=nil { + if err := z.AddDir("custom", setting.CustomPath); err != nil { log.Fatalf("Fail to include custom: %v", err) - } + } } else { log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath) } - if err := z.AddDir("log", setting.LogRootPath); err !=nil { + if err := z.AddDir("log", setting.LogRootPath); err != nil { log.Fatalf("Fail to include log: %v", err) } // FIXME: SSH key file. @@ -94,4 +94,6 @@ func runDump(ctx *cli.Context) { log.Printf("Removing tmp work dir: %s", TmpWorkDir) os.RemoveAll(TmpWorkDir) log.Printf("Finish dumping in file %s", fileName) + + return nil } |