1
0
forked from ALHP/ALHP.GO

handle git clean fail on resync

This commit is contained in:
2021-07-08 05:08:47 +02:00
parent 2665739b2d
commit eb6f4b965a

View File

@@ -615,7 +615,9 @@ func (b *BuildManager) syncWorker() {
cmd := backgroundCmd("sudo", "git_clean.sh", gitPath) cmd := backgroundCmd("sudo", "git_clean.sh", gitPath)
res, err := cmd.CombinedOutput() res, err := cmd.CombinedOutput()
log.Debug(string(res)) 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") cmd = backgroundCmd("sh", "-c", "cd "+gitPath+" && git reset --hard")
res, err = cmd.CombinedOutput() res, err = cmd.CombinedOutput()