Skip to content

CMT_HOME is not picked up by cometbft init #982

@sergio-mena

Description

@sergio-mena

Bug Report

Setup

CometBFT version : main

Have you tried the latest version: yes

ABCI app (name for built-in, URL for self-written if it's publicly available): N/A

Environment:

  • OS (e.g. from /etc/os-release): OSX
  • Install tools: N/A
  • Others: N/A

node command runtime flags:

Config

N/A

What happened?

Our docs state that both CMTHOME and CMT_HOME are valid variable names to set the root directory where data and config will live.

Command init does not pick up CMT_HOME:

% echo $CMT_HOME 

% export CMT_HOME=/tmp/my_cmt
% echo $CMT_HOME             
/tmp/my_cmt
% mkdir $CMT_HOME
% build/cometbft init validator
I[2023-06-16|17:02:35.885] Generated private validator                  module=main keyFile=/Users/sergio/.cometbft/config/priv_validator_key.json stateFile=/Users/sergio/.cometbft/data/priv_validator_state.json
I[2023-06-16|17:02:35.885] Generated node key                           module=main path=/Users/sergio/.cometbft/config/node_key.json
I[2023-06-16|17:02:35.885] Generated genesis file                       module=main path=/Users/sergio/.cometbft/config/genesis.json
% 

Check the logs: the root directory is the default one (.cometbft in my home dir)

What did you expect to happen?

init command should pick up the value of CMT_HOME (/tmp/my_cmt in the example above)

How to reproduce it

See above

Logs

See above

dump_consensus_state output

N/A

Anything else we need to know

No

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions