Fix empty health name (#385)
diff --git a/pkgs/firehose/CHANGELOG.md b/pkgs/firehose/CHANGELOG.md
index 838d0b4..054bb66 100644
--- a/pkgs/firehose/CHANGELOG.md
+++ b/pkgs/firehose/CHANGELOG.md
@@ -4,6 +4,7 @@
- Bump dart_apitool to fix errors with equal types being reported as different.
- Give comment files in health work.
- Don't ignore workspace pubspecs.
+- Fix bug to use default health.yaml names.
## 0.12.0
diff --git a/pkgs/firehose/bin/health.dart b/pkgs/firehose/bin/health.dart
index f43525b..740bf5a 100644
--- a/pkgs/firehose/bin/health.dart
+++ b/pkgs/firehose/bin/health.dart
@@ -68,8 +68,9 @@
final experiments = _listNonEmpty(parsedArgs, 'experiments');
final coverageWeb = parsedArgs.flag('coverage_web');
var healthYamlName = parsedArgs.option('health_yaml_name');
- final healthYamlNames =
- healthYamlName != null ? {healthYamlName} : {'health.yaml', 'health.yml'};
+ final healthYamlNames = healthYamlName != null && healthYamlName.isNotEmpty
+ ? {healthYamlName}
+ : {'health.yaml', 'health.yml'};
if (warnOn.toSet().intersection(failOn.toSet()).isNotEmpty) {
throw ArgumentError('The checks for which warnings are displayed and the '
'checks which lead to failure must be disjoint.');