diff --git a/src/chocolatey/infrastructure.app/ApplicationParameters.cs b/src/chocolatey/infrastructure.app/ApplicationParameters.cs index 6afa6b0fbf..ce0bcdccdb 100644 --- a/src/chocolatey/infrastructure.app/ApplicationParameters.cs +++ b/src/chocolatey/infrastructure.app/ApplicationParameters.cs @@ -174,6 +174,7 @@ public static class ConfigSettings public static readonly string ProxyBypassOnLocal = "proxyBypassOnLocal"; public static readonly string WebRequestTimeoutSeconds = "webRequestTimeoutSeconds"; public static readonly string UpgradeAllExceptions = "upgradeAllExceptions"; + public static readonly string DefaultTemplateName = "defaultTemplateName"; } public static class Features diff --git a/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs b/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs index 042d662c98..7956336e75 100644 --- a/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs +++ b/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs @@ -254,6 +254,7 @@ private static void set_config_items(ChocolateyConfiguration config, ConfigFileS config.Proxy.BypassList = set_config_item(ApplicationParameters.ConfigSettings.ProxyBypassList, configFileSettings, string.Empty, "Optional proxy bypass list. Comma separated. Available in 0.10.4+."); config.Proxy.BypassOnLocal = set_config_item(ApplicationParameters.ConfigSettings.ProxyBypassOnLocal, configFileSettings, "true", "Bypass proxy for local connections. Available in 0.10.4+.").is_equal_to(bool.TrueString); config.UpgradeCommand.PackageNamesToSkip = set_config_item(ApplicationParameters.ConfigSettings.UpgradeAllExceptions, configFileSettings, string.Empty, "A comma-separated list of package names that should not be upgraded when running `choco upgrade all'. Defaults to empty. Available in 0.10.14+."); + config.DefaultTemplateName = set_config_item(ApplicationParameters.ConfigSettings.DefaultTemplateName, configFileSettings, string.Empty, "Default template name used when running 'choco new' command. Available in 0.12.0+."); } private static string set_config_item(string configName, ConfigFileSettings configFileSettings, string defaultValue, string description, bool forceSettingValue = false) diff --git a/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs b/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs index d3c3e51886..c4ec782330 100644 --- a/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs +++ b/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs @@ -146,6 +146,7 @@ private void append_output(StringBuilder propertyValues, string append) public bool ContainsLegacyPackageInstalls { get; set; } public int CommandExecutionTimeoutSeconds { get; set; } public int WebRequestTimeoutSeconds { get; set; } + public string DefaultTemplateName { get; set; } /// /// One or more source locations set by configuration or by command line. Separated by semi-colon