JOJ3/pkg/healthcheck/repolfs.go
张泊明518370910136 6643644865
Some checks failed
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
feat(healthcheck): git lfs fsck --pointers
2025-06-28 08:29:03 -04:00

21 lines
341 B
Go

package healthcheck
import (
"fmt"
"os/exec"
)
func RepoLFS(workDir string) error {
cmd := exec.Command("git", "lfs", "fsck", "--pointers")
cmd.Dir = workDir
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf(
"error running `git lfs fsck --pointers`: %w, output: %s",
err,
output,
)
}
return nil
}