tools: use os home dir to instead of the hardcoded PATH (#9444)

porting PR #6498 to main

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed
This commit is contained in:
JayT106
2022-09-23 16:15:19 -04:00
committed by GitHub
parent 5fe1a72416
commit e8ec611ed4
3 changed files with 5 additions and 2 deletions

View File

@@ -17,6 +17,9 @@
- Data Storage
- [state] \#6541 Move pruneBlocks from consensus/state to state/execution. (@JayT106)
- Tooling
- [tools/tm-signer-harness] \#6498 Set OS home dir to instead of the hardcoded PATH. (@JayT106)
### FEATURES
### IMPROVEMENTS

View File

@@ -3,7 +3,7 @@
TENDERMINT_VERSION?=latest
BUILD_TAGS?='tendermint'
VERSION := $(shell git describe --always)
BUILD_FLAGS = -ldflags "-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)
BUILD_FLAGS = -ldflags "-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)"
.DEFAULT_GOAL := build

View File

@@ -17,7 +17,6 @@ import (
const (
defaultAcceptRetries = 100
defaultBindAddr = "tcp://127.0.0.1:0"
defaultTMHome = "~/.tendermint"
defaultAcceptDeadline = 1
defaultConnDeadline = 3
defaultExtractKeyOutput = "./signing.key"
@@ -59,6 +58,7 @@ Use "tm-signer-harness help <command>" for more information about that command.`
fmt.Println("")
}
defaultTMHome := internal.ExpandPath("~/.tendermint")
runCmd = flag.NewFlagSet("run", flag.ExitOnError)
runCmd.IntVar(&flagAcceptRetries,
"accept-retries",