From 91798142716a2b59f304a8d617bbc390955cd6e1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 00:14:29 +0400 Subject: [PATCH] chore(simdv2): allow overriding the --home flag (backport #22348) (#22350) --- simapp/v2/simdv2/cmd/commands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simapp/v2/simdv2/cmd/commands.go b/simapp/v2/simdv2/cmd/commands.go index 8d4186be8d19..b8721f3917de 100644 --- a/simapp/v2/simdv2/cmd/commands.go +++ b/simapp/v2/simdv2/cmd/commands.go @@ -36,7 +36,7 @@ import ( ) func newApp[T transaction.Tx](logger log.Logger, viper *viper.Viper) serverv2.AppI[T] { - viper.Set(serverv2.FlagHome, simapp.DefaultNodeHome) + viper.SetDefault(serverv2.FlagHome, simapp.DefaultNodeHome) return serverv2.AppI[T](simapp.NewSimApp[T](logger, viper)) } @@ -163,7 +163,7 @@ func appExport[T transaction.Tx]( // overwrite the FlagInvCheckPeriod viper.Set(server.FlagInvCheckPeriod, 1) - viper.Set(serverv2.FlagHome, simapp.DefaultNodeHome) + viper.SetDefault(serverv2.FlagHome, simapp.DefaultNodeHome) var simApp *simapp.SimApp[T] if height != -1 {