private void SetRunToolSettingsDefaults() { // If RunQuiet is already defined in config.json, don't override it if (!Settings.ContainsKey(RunQuietReservedKeyword)) { Setting runQuietSetting = new Setting() { Values = new List<string>() { "true", "false" }, ValueType = RunToolSettingValueTypeReservedKeyword, Description = "Run tool specific setting. Set to True to only display output from the executing command.", DefaultValue = "false" }; Settings.Add(RunQuietReservedKeyword, runQuietSetting); } // If WhatIf is already defined in config.json, don't override it if (!Settings.ContainsKey(WhatIfReservedKeyword)) { Setting whatIfSetting = new Setting() { Values = new List<string>() { "true", "false" }, ValueType = RunToolSettingValueTypeReservedKeyword, Description = "Run tool specific setting. Set to 'true' to only display commands chosen and not execute them", // Currently, providing a default value for this setting will prevent it being overwritten by the command line. // While it is not intuitive, the code as-is supports "<some command> -whatif" without requiring a boolean argument. // Created https://github.com/dotnet/buildtools/issues/1230 to track DefaultValue = string.Empty }; Settings.Add(WhatIfReservedKeyword, whatIfSetting); } // Settings don't currently allow aliases, so until we have a real need to do so can just define two, // so as to support both -dry-run and -WhatIf style usage. if (!Settings.ContainsKey(DryRunReservedKeyword)) { Setting dryRunSetting = new Setting() { Values = new List<string>() { "true", "false" }, ValueType = RunToolSettingValueTypeReservedKeyword, Description = "Run tool specific setting. Set to 'true' to only display commands chosen and not execute them", // As above: currently, providing a default value for this setting will prevent it being overwritten by the command line. // While it is not intuitive, the code as-is supports "<some command> -dry-run" without requiring a boolean argument. // Created https://github.com/dotnet/buildtools/issues/1230 to track DefaultValue = string.Empty }; Settings.Add(DryRunReservedKeyword, dryRunSetting); } }
private void SetRunToolSettingsDefaults() { // If RunQuiet is already defined in config.json, don't override it if (!Settings.ContainsKey(RunQuietReservedKeyword)) { Setting runQuietSetting = new Setting() { Values = new List<string>() { "True", "False" }, ValueType = RunToolSettingValueTypeReservedKeyword, Description = "Run tool specific setting. Set to True to only display output from the executing command.", DefaultValue = "false" }; Settings.Add(RunQuietReservedKeyword, runQuietSetting); } }