From 12ead6cc7e045202c01f5b08851c21b6b01dd640 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 27 Mar 2017 20:41:00 +0400 Subject: [PATCH] make changes backwards compatible (Refs #431) --- config/tendermint/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/tendermint/config.go b/config/tendermint/config.go index 991304b5e..b28170ce7 100644 --- a/config/tendermint/config.go +++ b/config/tendermint/config.go @@ -13,6 +13,10 @@ func getTMRoot(rootDir string) string { if rootDir == "" { rootDir = os.Getenv("TMHOME") } + if rootDir == "" { + // deprecated, use TMHOME (TODO: remove in TM 0.11.0) + rootDir = os.Getenv("TMROOT") + } if rootDir == "" { rootDir = os.Getenv("HOME") + "/.tendermint" }