From eb6f4b965a607a0dcf39da575df93eeb9442e9a6 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Thu, 8 Jul 2021 05:08:47 +0200 Subject: [PATCH] handle git clean fail on resync --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 6bd11ce..b7e9045 100644 --- a/main.go +++ b/main.go @@ -615,7 +615,9 @@ func (b *BuildManager) syncWorker() { cmd := backgroundCmd("sudo", "git_clean.sh", gitPath) res, err := cmd.CombinedOutput() log.Debug(string(res)) - check(err) + if err != nil { + log.Warningf("Failed to execute %s: %v", cmd.String(), err) + } cmd = backgroundCmd("sh", "-c", "cd "+gitPath+" && git reset --hard") res, err = cmd.CombinedOutput()