chore(healthcheck): better repo size log
This commit is contained in:
		
							parent
							
								
									0f5ccf8af2
								
							
						
					
					
						commit
						85e53f4f90
					
				|  | @ -16,7 +16,7 @@ func RepoSize(confSize float64) error { | ||||||
| 	cmd := exec.Command("git", "count-objects", "-v") | 	cmd := exec.Command("git", "count-objects", "-v") | ||||||
| 	output, err := cmd.CombinedOutput() | 	output, err := cmd.CombinedOutput() | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		slog.Error("running git command:", "err", err) | 		slog.Error("running git command:", "err", err, "output", output) | ||||||
| 		return fmt.Errorf("error running git command: %w", err) | 		return fmt.Errorf("error running git command: %w", err) | ||||||
| 	} | 	} | ||||||
| 	lines := strings.Split(string(output), "\n") | 	lines := strings.Split(string(output), "\n") | ||||||
|  | @ -27,8 +27,8 @@ func RepoSize(confSize float64) error { | ||||||
| 			sizeStr := fields[1] | 			sizeStr := fields[1] | ||||||
| 			size, err := strconv.Atoi(sizeStr) | 			size, err := strconv.Atoi(sizeStr) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				slog.Error("running git command:", "err", err) | 				slog.Error("parsing repo size:", "err", err, "line", line) | ||||||
| 				return fmt.Errorf("error running git command: %w", err) | 				return fmt.Errorf("error parsing repo size: %w", err) | ||||||
| 			} | 			} | ||||||
| 			sum += size | 			sum += size | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user