public function moduleEnabled($name) {
    $this->options[] = '--format=json';
    $modules = $this->__call('pmList', []);
    if (!$modules = json_decode($modules, TRUE)) {
      throw new DrushFormatException("Cannot parse json output from drush: $modules", $modules);
    }
    $this->options = [];
    return isset($modules[$name]) && $modules[$name]['status'] === 'Enabled';
  }