ShellProcessResults.fromList constructor

ShellProcessResults.fromList(
  1. List<ShellProcessResult> list
)

Throws if already a a shell process Results

Implementation

factory ShellProcessResults.fromList(List<ShellProcessResult> list) {
  if (list is ShellProcessResults) {
    throw ArgumentError('Already has ShellProcessResult attached');
  }

  /// If empty, shell is less relevant so use default
  var shell = list.firstOrNull?.shell ?? Shell();
  return ShellProcessResultInternalList.fromList(shell, list);
}