fix(config): setup DEVSY_HOME / --home in PathManager#673
Merged
Conversation
The PathManager refactor (#74) dropped the DEVSY_HOME override that GetConfigDir() previously honored, so --home and $DEVSY_HOME had no effect and everything resolved under ~/.devsy. Add a shared homeOverrideDir helper and route the five top-level dir methods on each OS through it, rooting config/data at DEVSY_HOME and cache/state/run beneath it. Fixes #672
✅ Deploy Preview for devsydev canceled.
|
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for images-devsy-sh canceled.
|
skevetter
marked this pull request as ready for review
July 17, 2026 18:21
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
--homeand\$DEVSY_HOMEhad no effect — provider/workspace data always resolved under~/.devsy(issue #672).The PathManager refactor (#74) moved path computation into per-OS implementations whose
ConfigDir/DataDir/CacheDir/StateDir/RuntimeDirmethods callos.UserHomeDir()and never consultDEVSY_HOME. The originalGetConfigDir()honored the override by returning it directly as the.devsyroot; that behavior was lost.This adds a shared
homeOverrideDirhelper and routes the five top-level dir methods on each OS through it: whenDEVSY_HOMEis set, config/data root at it and cache/state/run sit beneath it; otherwise the OS-native default applies.Fixes #672.
Verification
devsy --home /tmp/x/.devsy provider add dockernow creates/tmp/x/.devsywith the provider config, independent of~/.devsy.TestDevsyHomeOverride/TestDevsyHomeOverrideConfigFilePath.go test ./pkg/config/...(26 pass) and./cmd/... ./pkg/provider/... ./pkg/agent/...(590 pass).Summary by CodeRabbit
New Features
EnvHomeenvironment variable.Bug Fixes