docs: function checkTool (tool, minVersion, message, toolFriendlyName) {
      toolFriendlyName = toolFriendlyName || tool;
  
      // Check whether tool command is available at all
      var tool_command = shell.which(tool);
      if (!tool_command) {
          return Q.reject(toolFriendlyName + ' was not found. ' + (message || ''));
      }
      // check if tool version is greater than specified one
      return versions.get_tool_version(tool).then(function (version) {
          version = version.trim();
          return versions.compareVersions(version, minVersion) >= 0 ?
              Q.resolve(version) :
              Q.reject('Cordova needs ' + toolFriendlyName + ' version ' + minVersion +
                ' or greater, you have version ' + version + '. ' + (message || ''));
      });
  }