We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ece1518 commit 33a8fa5Copy full SHA for 33a8fa5
1 file changed
internal/bootstrap/config.go
@@ -78,6 +78,17 @@ func InitConfig() {
78
if err != nil {
79
log.Fatalf("load config error: %+v", err)
80
}
81
+ if flags.DataDir != "" {
82
+ conf.Conf.Database.DBFile = filepath.Join(flags.DataDir, "data.db")
83
+ conf.Conf.TempDir = filepath.Join(flags.DataDir, "temp")
84
+ conf.Conf.BleveDir = filepath.Join(flags.DataDir, "bleve")
85
+ if conf.Conf.Log.Enable {
86
+ conf.Conf.Log.Name = filepath.Join(flags.DataDir, "log/log.log")
87
+ }
88
+ if conf.Conf.DistDir != "" {
89
+ conf.Conf.DistDir = filepath.Join(flags.DataDir, "dist")
90
91
92
LastLaunchedVersion = conf.Conf.LastLaunchedVersion
93
if strings.HasPrefix(conf.Version, "v") || LastLaunchedVersion == "" {
94
conf.Conf.LastLaunchedVersion = conf.Version
0 commit comments