diff options
Diffstat (limited to 'cmd/update.go')
-rw-r--r-- | cmd/update.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/update.go b/cmd/update.go index 4cd62a7f..30f778f2 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -28,18 +28,19 @@ func runUpdate(c *cli.Context) { if c.IsSet("config") { setting.CustomConf = c.String("config") } - cmd := os.Getenv("SSH_ORIGINAL_COMMAND") - if cmd == "" { - return - } setup("update.log") + if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { + log.GitLogger.Trace("SSH_ORIGINAL_COMMAND is empty") + return + } + args := c.Args() if len(args) != 3 { - log.GitLogger.Fatal(2, "received less 3 parameters") - } else if args[0] == "" { - log.GitLogger.Fatal(2, "refName is empty, shouldn't use") + log.GitLogger.Fatal(2, "Arguments received are not equal to three") + } else if len(args[0]) == 0 { + log.GitLogger.Fatal(2, "First argument 'refName' is empty, shouldn't use") } task := models.UpdateTask{ |