diff options
Diffstat (limited to 'cmd/hook.go')
-rw-r--r-- | cmd/hook.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/hook.go b/cmd/hook.go index 8078763b1..73386038b 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -308,6 +308,8 @@ func runHookPostReceive(c *cli.Context) error { ctx, cancel := installSignals() defer cancel() + setup("hooks/post-receive.log", c.Bool("debug")) + // First of all run update-server-info no matter what if _, _, err := git.NewCommand(ctx, "update-server-info").RunStdString(nil); err != nil { return fmt.Errorf("Failed to call 'git update-server-info': %v", err) @@ -318,8 +320,6 @@ func runHookPostReceive(c *cli.Context) error { return nil } - setup("hooks/post-receive.log", c.Bool("debug")) - if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { if setting.OnlyAllowPushIfGiteaEnvironmentSet { return fail(`Rejecting changes as Gitea environment not set. |