message: Separate version checking into new function
diff: @@ -54,9 +54,18 @@ pub fn install_artifact(
  fn tool_exists(tool_name: &str) -> Result<Option<Download>, failure::Error> {
  if let Ok(path) = which(tool_name) {
  + let no_parent_msg = format!("{} There is no path parent", emoji::WARN);
  log::debug!("found global {} binary at: {}", tool_name, path.display());
  + if !tool_needs_update(tool_name, &path)? {
  + return Ok(Some(Download::at(path.parent().expect(&no_parent_msg))));
  + }
  + }
  +
  + Ok(None)
  +}
  +
  +fn tool_needs_update(tool_name: &str, path: &Path) -> Result<bool, failure::Error> {
  let no_version_msg = format!("failed to find version for {}", tool_name);
  - let no_parent_msg = format!("{} There is no path parent", emoji::WARN);
  let tool_version_output = Command::new(path.as_os_str())
  .arg("--version")
  @@ -66,12 +75,12 @@ fn tool_exists(tool_name: &str) -> Result<Option<Download>, failure::Error> {
  if !tool_version_output.status.success() {
  let error = String::from_utf8_lossy(&tool_version_output.stderr);
  log::debug!("could not find version for {}\n{}", tool_name, error);
  - return Ok(None);
  + return Ok(true);
  }
  let installed_tool_version = String::from_utf8_lossy(&tool_version_output.stdout);
  let installed_tool_version = match installed_tool_version.split_whitespace().last() {
  - None => return Ok(None),
  + None => return Ok(true),
  Some(v) => v,
  };
  let latest_tool_version = get_latest_version(tool_name)?;
  @@ -81,7 +90,7 @@ fn tool_exists(tool_name: &str) -> Result<Option<Download>, failure::Error> {
  tool_name,
  installed_tool_version
  );
  - return Ok(Some(Download::at(path.parent().expect(&no_parent_msg))));
  + return Ok(false);
  }
  log::info!(
  "installed {} version {} is out of date with latest version {}",
  @@ -89,9 +98,7 @@ fn tool_exists(tool_name: &str) -> Result<Option<Download>, failure::Error> {
  installed_tool_version,
  latest_tool_version
  );
  - }
  -
  - Ok(None)
  + Ok(true)
  }
  fn download_prebuilt(
  