diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs index a6f873e81b..6936f2ec70 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs @@ -370,7 +370,7 @@ Chocolatey Professional showing private download cache and virus scan diff --git a/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs b/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs index 713067673b..49da57082a 100644 --- a/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs +++ b/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs @@ -58,5 +58,12 @@ public sealed class PackagesConfigFilePackageSetting [XmlAttribute(AttributeName = "disabled")] public bool Disabled { get; set; } + + [System.ComponentModel.DefaultValue(-1)] + [XmlAttribute(AttributeName = "timeout")] + public int Timeout { get; set; } + + [XmlAttribute(AttributeName = "force")] + public bool Force { get; set; } } } diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index 2143f89c40..c1815a3522 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -736,6 +736,8 @@ private IEnumerable get_packages_from_config(string pac if (pkgSettings.ApplyPackageParametersToDependencies) packageConfig.ApplyPackageParametersToDependencies = true; SourceType sourceType; if (Enum.TryParse(pkgSettings.Source, true, out sourceType)) packageConfig.SourceType = sourceType; + if (pkgSettings.Force) packageConfig.Force = true; + packageConfig.CommandExecutionTimeoutSeconds = pkgSettings.Timeout == -1 ? packageConfig.CommandExecutionTimeoutSeconds : pkgSettings.Timeout; this.Log().Info(ChocolateyLoggers.Important, @"{0}".format_with(packageConfig.PackageNames)); packageConfigs.Add(packageConfig);