Example #1
0
        public virtual void run(ChocolateyConfiguration configuration)
        {
            _packageService.ensure_source_app_installed(configuration);
            // note: you must leave the .ToList() here or else the method won't be evaluated!
            var packageResults = _packageService.list_run(configuration).ToList();

            // if there are no results, exit with a 2.
            if (configuration.Features.UseEnhancedExitCodes && packageResults.Count == 0 && Environment.ExitCode == 0)
            {
                Environment.ExitCode = 2;
            }
        }
Example #2
0
        public virtual void list_pins(ChocolateyConfiguration config)
        {
            var quiet = config.QuietOutput;

            config.QuietOutput = true;
            var packages = _packageService.list_run(config).ToList();

            config.QuietOutput = quiet;
            bool showPinned = !config.PinCommand.Unpinned;

            foreach (var pkg in packages.or_empty_list_if_null())
            {
                var pkgInfo = _packageInfoService.get_package_information(pkg.Package);
                if (pkgInfo != null && pkgInfo.IsPinned == showPinned)
                {
                    this.Log().Info(() => "{0}|{1}".format_with(pkgInfo.Package.Id, pkgInfo.Package.Version));
                }
            }
        }
Example #3
0
 public override void run(ChocolateyConfiguration configuration)
 {
     if (configuration.ListCommand.LocalOnly)
     {
         _packageService.list_run(configuration, logResults: true);
     }
     else
     {
         _packageService.upgrade_run(configuration);
     }
 }
 public override void run(ChocolateyConfiguration configuration)
 {
     if (configuration.ListCommand.LocalOnly)
     {
         // note: you must leave the .ToList() here or else the method may not be evaluated!
         _packageService.list_run(configuration).ToList();
     }
     else
     {
         _packageService.upgrade_run(configuration);
     }
 }
Example #5
0
 public void run(ChocolateyConfiguration configuration)
 {
     _packageService.list_run(configuration, logResults: true);
 }
 public virtual void run(ChocolateyConfiguration configuration)
 {
     _packageService.ensure_source_app_installed(configuration);
     // note: you must leave the .ToList() here or else the method won't be evaluated!
     _packageService.list_run(configuration).ToList();
 }
Example #7
0
 public void run(ChocolateyConfiguration configuration)
 {
     _packageService.ensure_source_app_installed(configuration);
     _packageService.list_run(configuration, logResults: true);
 }