combine method
Implementation
EnvConfig? combine({required String directory}) {
final commands = <String>{};
final files = <String>{};
for (final config in this) {
if (config == null) continue;
commands.addAll(config.commands ?? []);
files.addAll(config.files ?? []);
}
if (commands.isEmpty && files.isEmpty) return null;
return EnvConfig(
commands: commands,
files: files,
workingDirectory: directory,
);
}