feat(healthcheck): set safe dir in count-objects
This commit is contained in:
		
							parent
							
								
									332bf7d4de
								
							
						
					
					
						commit
						837f9d9981
					
				|  | @ -13,7 +13,13 @@ import ( | ||||||
| func RepoSize(confSize float64) error { | func RepoSize(confSize float64) error { | ||||||
| 	// TODO: reimplement here when go-git is available
 | 	// TODO: reimplement here when go-git is available
 | ||||||
| 	// https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md
 | 	// https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md
 | ||||||
| 	cmd := exec.Command("git", "count-objects", "-v") | 	cmd := exec.Command( | ||||||
|  | 		"git", | ||||||
|  | 		"-c", | ||||||
|  | 		"safe.directory='*'", | ||||||
|  | 		"count-objects", | ||||||
|  | 		"-v", | ||||||
|  | 	) | ||||||
| 	output, err := cmd.CombinedOutput() | 	output, err := cmd.CombinedOutput() | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		slog.Error("running git command:", "err", err, "output", output) | 		slog.Error("running git command:", "err", err, "output", output) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user