Allow overriding config dir with BUTLER_CONFIG_DIR env var#12611
Draft
Allow overriding config dir with BUTLER_CONFIG_DIR env var#12611
Conversation
Check the BUTLER_CONFIG_DIR environment variable before falling back to the platform config directory. This allows callers to explicitly override the config location for gitbutler.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an environment-variable override to control where GitButler reads/writes its shared configuration directory, improving flexibility for callers (e.g., CI, packaging, custom installs) before falling back to the OS platform default.
Changes:
- Check
BUTLER_CONFIG_DIRinapp_config_dir()and use it when set. - Preserve existing
E2E_TEST_APP_DATA_DIRoverride behavior and platform fallback behavior.
Contributor
Author
|
@Byron this is a change I've had in my workspace for a while, mainly so I can run two dev instances with different configs. Do you have any immediate opinion on it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check the BUTLER_CONFIG_DIR environment variable before falling back to
the platform config directory. This allows callers to explicitly
override the config location for gitbutler.