Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse --home flag earlier #20769

Closed
julienrbrt opened this issue Jun 25, 2024 · 0 comments · Fixed by #20771
Closed

Parse --home flag earlier #20769

julienrbrt opened this issue Jun 25, 2024 · 0 comments · Fixed by #20771
Assignees
Labels

Comments

@julienrbrt
Copy link
Member

julienrbrt commented Jun 25, 2024

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.

@github-actions github-actions bot added the needs-triage Issue that needs to be triaged label Jun 25, 2024
@julienrbrt julienrbrt added C:CLI and removed needs-triage Issue that needs to be triaged labels Jun 25, 2024
@julienrbrt julienrbrt self-assigned this Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant