add masked check to isEnabled boolean

This commit is contained in:
2021-05-15 20:04:46 -07:00
parent 34f11bfcd1
commit 58970695b4

View File

@@ -51,7 +51,10 @@ func IsEnabled(ctx context.Context, unit string, opts Options) (bool, error) {
return true, nil
} else if matched, _ := regexp.MatchString(`disabled`, stdout); matched {
return false, nil
} else if matched, _ := regexp.MatchString(`masked`, stdout); matched {
return false, nil
}
return false, err
}