-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
Add specific envvar system #16868
Add specific envvar system #16868
Conversation
The travis exception is there because all characters there are valid English Latin ASCII chars so there won't be any problems. |
Ping @ryanofsky |
Two issues I see and suggested fixes I'd make:
Probably if this is going to be merged there should also be a python test covering this functionality. But you might could wait for more concept acks before putting work into that. I guess I don't feel strongly, but overall I'd be for this change with rough edges removed. |
|
@ryanofsky Done |
This will break the functional (and possibly unit tests?) |
@MarcoFalke How? |
Would be nice to document this
No environment variables are set on travis, so it can't possibly fail |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Added help |
Concept ACK on |
Ok, then I will remove |
Done 6ccb229 |
@emilengler Can you squash your chanegs into a single commit (dropping all intermediate commit messages etc), add a more descriptive commit message and body as well as update the PR text to reflect the current state of this PR. |
I removed the help from the |
@fanquake Done |
Name | Option equivalent | ||
-- | -- | ||
BITCOIN_DATADIR | -datadir | ||
BITCOIN_CONF | -conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This complicates the init process and argument parsing. I am ~0 on the overall pull, but at the very least, this should include documentation on the precedence. Tests wouldn't hurt either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't really complicates the init process. It just checks if a specific argument is set. If not it will use the envvar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcoFalke Updated, please check
This commit adds a way to set the -conf and -datadir flag using the environment variables BITCOIN_CONF and BITCOIN_DATADIR
Closed because of lack of interest |
See #16829
Description
This PR adds a way to set some CLI args with an environment variable.
The syntax for the envvars are
BITCOIN_<ARGNAME>=<VALUE>
E.g
BITCOIN_DATADIR=/home/emil/bitcoin/
Console arguments override setted envvars.
The envvars are always uppercase.
Testing
Set some envvars
On Unix:
This will start Bitcoin-Qt using the datadir path with an english overlay.
List of supported envvars
blocksdirdebuclogfileincludeconfloadblockpid