Skip to content

Conversation

@crwood
Copy link
Member

@crwood crwood commented Apr 13, 2022

This PR allows any/all configuration values normally declared in gridsync/resources/config.txt to be optionally overridden by means of setting GRIDSYNC_-prefixed environment variables. Environment variable names must follow form GRIDSYNC_SECTION_OPTION in order for the corresponding value to override the value of the appropriate section and option of config.txt -- for example, setting an environment variable of GRIDSYNC_DEBUG_LOG_MAXLEN=512 is equivalent to having the following entry in config.txt:

[debug]
log_maxlen = 512

In addition, this PR also slightly modifies the behavior of populating the UI such that, if a "default" grid connection is declared (e.g., via GRIDSYNC_CONNECTION_DEFAULT=demo-grid) that grid will also always be selected/displayed first by default (thereby it somewhat easier to switch between connections in the event that multi-grid support has also been disabled).

Closes #465

@crwood crwood merged commit 921cc89 into master Apr 13, 2022
@crwood crwood deleted the 465.override-config.txt branch April 13, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Hardcoded" configuration values in config.txt can impede application testing

2 participants