From 6d074c41f3ca88bffc3fec81c2554c13431a7635 Mon Sep 17 00:00:00 2001 From: Nulo Date: Thu, 26 Jan 2023 20:20:21 -0300 Subject: [PATCH] =?UTF-8?q?gitea-ci:=20detectar=20correctamente=20si=20ya?= =?UTF-8?q?=20se=20baj=C3=B3=20la=20repo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitea-ci/webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea-ci/webhook.go b/gitea-ci/webhook.go index fcb3ae9..4ba4d09 100644 --- a/gitea-ci/webhook.go +++ b/gitea-ci/webhook.go @@ -185,7 +185,7 @@ func (h webhook) ServeHTTP(w http.ResponseWriter, req *http.Request) { } var cmd *exec.Cmd - if _, err = os.ReadDir(path.Join(src, ".git")); os.IsExist(err) { + if entries, _ := os.ReadDir(path.Join(src, ".git")); len(entries) > 0 { cmd = exec.Command("git", "pull") cmd.Dir = src } else {