fix: tighten config and update error handling

This commit is contained in:
2026-05-13 17:03:20 +08:00
parent 9af18f400c
commit 142c611fcb
4 changed files with 49 additions and 4 deletions

View File

@@ -375,11 +375,13 @@ func (s *Service) RunAutoUpdate(ctx context.Context) error {
state.Skills[i] = skill
continue
}
if commit, err := s.git.CurrentCommit(skill.LocalPath); err == nil {
skill.CurrentCommit = commit
} else {
commit, err := s.git.CurrentCommit(skill.LocalPath)
if err != nil {
skill.LastError = err.Error()
state.Skills[i] = skill
continue
}
skill.CurrentCommit = commit
skill.LastError = ""
skill.LastCheckedAt = time.Now().Format(time.RFC3339)
state.Skills[i] = skill