make changes backwards compatible (Refs #431)

This commit is contained in:
Anton Kaliaev
2017-03-27 20:41:00 +04:00
parent 5f6de800a0
commit 12ead6cc7e

View File

@ -13,6 +13,10 @@ func getTMRoot(rootDir string) string {
if rootDir == "" { if rootDir == "" {
rootDir = os.Getenv("TMHOME") rootDir = os.Getenv("TMHOME")
} }
if rootDir == "" {
// deprecated, use TMHOME (TODO: remove in TM 0.11.0)
rootDir = os.Getenv("TMROOT")
}
if rootDir == "" { if rootDir == "" {
rootDir = os.Getenv("HOME") + "/.tendermint" rootDir = os.Getenv("HOME") + "/.tendermint"
} }