Пример #1
0
        public static bool LocateRepository(LocateRepository task)
        {
            try
            {
                task.Id = GitOperations.LocateRepository(task.Directory);
            }
            catch (Exception e)
            {
#if NET461
                foreach (var message in TaskImplementation.GetLog())
                {
                    task.Log.LogMessage(message);
                }
#endif
                task.Log.LogWarningFromException(e, showStackTrace: true);

                return(true);
            }

            if (task.Id == null)
            {
                task.Log.LogWarning(Resources.UnableToLocateRepository, task.Directory);
            }

            return(!task.Log.HasLoggedErrors);
        }
Пример #2
0
        public static bool LocateRepository(LocateRepository task)
        {
            task.Id = GitOperations.LocateRepository(task.Directory);

            if (task.Id == null)
            {
                task.Log.LogError(Resources.UnableToLocateRepository, task.Directory);
            }

            return(!task.Log.HasLoggedErrors);
        }