mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-04 12:39:06 +02:00
[management,misc] Fix configuration migration checks
The initial migration let an empty legacy Datadir override Management defaults and pulled Viper into WASM builds through the common util package. Normalize the Management data directory, isolate template expansion from the loader dependency, and split source binding to satisfy the quality gate.
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
configloader "github.com/netbirdio/netbird/util/config"
|
||||
"github.com/netbirdio/netbird/util/envtemplate"
|
||||
)
|
||||
|
||||
func WriteBytesWithRestrictedPermission(ctx context.Context, file string, bs []byte) error {
|
||||
@@ -243,7 +243,7 @@ func ReadJsonWithEnvSub(file string, res interface{}) (interface{}, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
output, err := configloader.ExpandEnvTemplate(bs)
|
||||
output, err := envtemplate.Expand(bs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user