diff --git a/runner/config.go b/runner/config.go index de251c8c..681be82d 100644 --- a/runner/config.go +++ b/runner/config.go @@ -387,7 +387,9 @@ func (c *Config) rel(path string) string { // WithArgs returns a new config with the given arguments added to the configuration. func (c *Config) WithArgs(args map[string]TomlInfo) { for _, value := range args { - if value.Value != nil && *value.Value != unsetDefault { + // Ignore values that match the default configuration. + // This ensures user-specified configurations are not overwritten by default values. + if value.Value != nil && *value.Value != value.fieldValue { v := reflect.ValueOf(c) setValue2Struct(v, value.fieldPath, *value.Value) } diff --git a/runner/flag.go b/runner/flag.go index 44c568b2..1844ce27 100644 --- a/runner/flag.go +++ b/runner/flag.go @@ -4,8 +4,6 @@ import ( "flag" ) -const unsetDefault = "DEFAULT" - // ParseConfigFlag parse toml information for flag func ParseConfigFlag(f *flag.FlagSet) map[string]TomlInfo { c := defaultConfig()