fs: make sure we load the options defaults to start with
This commit is contained in:
parent
91558ce6aa
commit
532a0818f7
1 changed files with 11 additions and 0 deletions
|
@ -437,6 +437,17 @@ func RegisterGlobalOptions(oi OptionsInfo) {
|
||||||
log.Fatalf("%v", err)
|
log.Fatalf("%v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Load the default values into the options.
|
||||||
|
//
|
||||||
|
// These will be from the ultimate defaults or environment
|
||||||
|
// variables.
|
||||||
|
//
|
||||||
|
// The flags haven't been processed yet so this will be run
|
||||||
|
// again when the flags are ready.
|
||||||
|
err := oi.load()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to load %q default values: %v", oi.Name, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var optionName = regexp.MustCompile(`^[a-z0-9_]+$`)
|
var optionName = regexp.MustCompile(`^[a-z0-9_]+$`)
|
||||||
|
|
Loading…
Reference in a new issue