verifyStep property

  1. @override
CommandStep get verifyStep
override

Both tools have to be there, and the version is reported when the host's ps is one that can say (procps-ng can; BSD and busybox cannot, and are not wrong to refuse --version).

Implementation

@override
CommandStep get verifyStep => const CommandStep('sh', [
  '-c',
  'command -v ps >/dev/null 2>&1 && command -v top >/dev/null 2>&1 || exit 1\n'
      'ps --version 2>/dev/null || true',
]);