load static method

Future<SetupConfig?> load({
  1. String? startDir,
})

Implementation

static Future<SetupConfig?> load({String? startDir}) async {
  final String currentDir = startDir ?? Directory.current.path;

  final List<String> searchPaths = configSearchPaths(currentDir);

  for (final String path in searchPaths) {
    final String normalizedPath = p.normalize(path);
    final SetupConfig? config =
        await SetupConfig.loadFromFile(normalizedPath);
    if (config != null) {
      verbose('Loaded config from: $normalizedPath');
      return config;
    }
  }

  return null;
}