mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4426 from gyuho/f0
etcd-agent: fix data-dir path check
This commit is contained in:
commit
f003e421f5
@ -150,9 +150,9 @@ func (a *Agent) status() client.Status {
|
||||
func (a *Agent) dataDir() string {
|
||||
datadir := path.Join(a.cmd.Path, "*.etcd")
|
||||
args := a.cmd.Args
|
||||
// only parse the simple case like "-data-dir /var/lib/etcd"
|
||||
// only parse the simple case like "--data-dir /var/lib/etcd"
|
||||
for i, arg := range args {
|
||||
if arg == "-data-dir" {
|
||||
if arg == "--data-dir" {
|
||||
datadir = args[i+1]
|
||||
break
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user