feat(appstash): add APPSTASH_BASE_DIR env var support#75
Merged
pyramation merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
When no baseDir option is passed programmatically, appstash now checks the APPSTASH_BASE_DIR environment variable before falling back to os.homedir(). This enables test isolation without overriding HOME. Priority: baseDir option > APPSTASH_BASE_DIR env var > os.homedir()
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
5 tasks
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.
Summary
Adds
APPSTASH_BASE_DIRenvironment variable support to theappstash()directory resolution chain. When nobaseDiroption is passed programmatically, appstash now checksprocess.env.APPSTASH_BASE_DIRbefore falling back toos.homedir().Resolution priority:
baseDiroption >APPSTASH_BASE_DIRenv var >os.homedir()> XDG fallback > tmpThis enables test isolation for generated CLIs (which call
createConfigStore(toolName)without abaseDiroption) without overridingHOME.Review & Testing Checklist for Human
APPSTASH_BASE_DIRdoesn't conflict with anything already in use across your projects (grep -r APPSTASH_BASE_DIRacross repos)Notes
APPSTASH_BASE_DIRis falsy and correctly falls through toos.homedir()constructivecurrently overrideHOMEto isolate appstash config; this env var provides a cleaner alternativeLink to Devin session: https://app.devin.ai/sessions/c92c3a11450342f8875625a60fa1be28
Requested by: @pyramation