JOJ3/pkg/healthcheck/repolfs.go
张泊明518370910136 8506887680
All checks were successful
submodules sync / sync (push) Successful in 50s
build / build (push) Successful in 1m55s
build / trigger-build-image (push) Successful in 9s
chore(healthcheck): extra newline
2025-06-29 03:53:43 -04:00

28 lines
384 B
Go

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