/**
  * Returns the .git directory if present. Errors the given
  * message if not.
  *
  * @param string      $message     The message to error
  * @param IOInterface $inputOutput The Input/Output helper interface
  *
  * @return false|string
  */
 private static function getGuardedGitDirectory($message, IOInterface $inputOutput)
 {
     $gitDirectory = implode(DIRECTORY_SEPARATOR, [dirname(__DIR__, 4), self::GIT_PATH]);
     if (!is_dir($gitDirectory)) {
         $inputOutput->error($message);
         return false;
     }
     return $gitDirectory;
 }