예제 #1
0
파일: Main.cs 프로젝트: pjf/CKAN
        private static int Update(UpdateOptions options, RegistryManager registry_manager, CKAN.KSP current_instance, IUser user)
        {
            user.RaiseMessage("Downloading updates...");

            try
            {
                int updated = Repo.Update(registry_manager, current_instance.Version(), options.repo);
                user.RaiseMessage("Updated information on {0} available modules", updated);
            }
            catch (MissingCertificateKraken kraken)
            {
                // Handling the kraken means we have prettier output.
                user.RaiseMessage(kraken.ToString());
                return Exit.ERROR;
            }

            return Exit.OK;
        }
예제 #2
0
        private static int Update(UpdateOptions options)
        {
            User.WriteLine("Downloading updates...");

            try
            {
                int updated = Repo.Update(options.repo);
                User.WriteLine("Updated information on {0} available modules", updated);
            }
            catch (MissingCertificateKraken kraken)
            {
                // Handling the kraken means we have prettier output.
                Console.WriteLine(kraken);
                return(Exit.ERROR);
            }

            return(Exit.OK);
        }