[WIP] add viper to manage envvars and cfg files
This commit is contained in:
1 parent
09a6ffb1f3
commit
1080bfde68
7 files changed
+261
-111
No files matched your search
+2
-1
@@ -3,6 +3,7 @@ package cmd
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/storage/bolt/importer"
|
||||
"github.com/spf13/cobra"
|
||||
v "github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -24,7 +25,7 @@ this version.`,
|
||||
oldDB := mustGetString(cmd, "old.database")
|
||||
oldConf := mustGetString(cmd, "old.config")
|
||||
|
||||
err := importer.Import(oldDB, oldConf, databasePath)
|
||||
err := importer.Import(oldDB, oldConf, v.GetString("database"))
|
||||
checkErr(err)
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user