Ejemplo n.º 1
0
        public bool Execute()
        {
            if (_resolver == null)
            {
                _logger.LogError($"No resolver found for {_source}");
                return(false);
            }

            if (!_resolver.CheckInstalled())
            {
                _logger.LogError($"{_source} isn't installed");
                return(false);
            }

            if (_resolver.CheckUpdated())
            {
                _logger.LogSuccess($"{_resolver.GetFullSource()} is up to date!");
                return(true);
            }

            _logger.LogInformation($"Updating {_source}");
            if (!_resolver.Resolve())
            {
                _logger.LogError($"Unable to update {_source}");
                return(false);
            }

            _logger.LogSuccess($"{_source} updated successfully!");
            return(true);
        }