Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public override bool Execute()
        {
            Id = GitOperations.LocateRepository(Directory);

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

            return(!Log.HasLoggedErrors);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        public override bool Execute()
        {
            Id = GitOperations.LocateRepository(Directory);

            if (Id == null)
            {
                Log.LogError($"Unable to locate repository containing directory '{Directory}'.");
                return(false);
            }

            return(true);
        }