Skip to content

Parse --home flag earlier #20769

@julienrbrt

Description

@julienrbrt

Having a custom node location (using the --home flag) is causing many issues at node instantiation.
We have been using many hacks to avoid using the default one:

Default one set here:

The issue is the --home flag is parsed too late (at cobra run (RunE and & co), while most of the instantiation is done before the commands and the flag parsing.

We need to parse the --home flag earlier or rely solely on environment variable. Best would be at init() or somewhere in main() before any other logic, and pass it down.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions