diff --git a/env/env.go b/env/env.go index 1ff1542..88d09bd 100644 --- a/env/env.go +++ b/env/env.go @@ -32,9 +32,14 @@ func NewEnv() *types.MeshEnv { func NewBaseEnv() *types.MeshEnv { if MeshEnv == nil { MeshEnv = &types.MeshEnv{ - Prefix: GetEnvDefault("BlocksMesh_Prefix", "/usr/local/bsm"), RuntimeMode: strings.ToLower(GetEnvDefault("BlocksMesh_RuntimeMode", "dev")), } + + if MeshEnv.RuntimeMode == "dev" { + MeshEnv.Prefix = GetEnvDefault("BlocksMesh_Prefix", utils.GetCurrentPath()) + } else { + MeshEnv.Prefix = GetEnvDefault("BlocksMesh_Prefix", "/usr/local/bsm") + } } return MeshEnv }