hasCommand function

bool hasCommand(
  1. IShell shell,
  2. String command
)

True if the command exists. Logs a Warning if the command is not found

since 0.0.1

Implementation

bool hasCommand(IShell shell, String command) {
  var hasCommand = shell.hasCommand(command);
  if (!hasCommand) {
    _log.warning(
      '`$command` not found. Please check your \$PATH and environment',
    );
  }
  return hasCommand;
}