mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 19:40:07 +00:00
fix(status): correct external disk capacity totals
This commit is contained in:
@@ -347,7 +347,7 @@ func (c *Collector) Collect() (MetricsSnapshot, error) {
|
||||
}, mergeErr
|
||||
}
|
||||
|
||||
func runCmd(ctx context.Context, name string, args ...string) (string, error) {
|
||||
var runCmd = func(ctx context.Context, name string, args ...string) (string, error) {
|
||||
cmd := exec.CommandContext(ctx, name, args...)
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
@@ -356,7 +356,7 @@ func runCmd(ctx context.Context, name string, args ...string) (string, error) {
|
||||
return string(output), nil
|
||||
}
|
||||
|
||||
func commandExists(name string) bool {
|
||||
var commandExists = func(name string) bool {
|
||||
if name == "" {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user