Skip to content

fix(config): setup DEVSY_HOME / --home in PathManager#673

Merged
skevetter merged 1 commit into
mainfrom
fix/devsy-home-override-672
Jul 17, 2026
Merged

fix(config): setup DEVSY_HOME / --home in PathManager#673
skevetter merged 1 commit into
mainfrom
fix/devsy-home-override-672

Conversation

@skevetter

@skevetter skevetter commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

--home and \$DEVSY_HOME had 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/RuntimeDir methods call os.UserHomeDir() and never consult DEVSY_HOME. The original GetConfigDir() honored the override by returning it directly as the .devsy root; that behavior was lost.

This adds a shared homeOverrideDir helper and routes the five top-level dir methods on each OS through it: when DEVSY_HOME is 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 docker now creates /tmp/x/.devsy with the provider config, independent of ~/.devsy.
  • Added TestDevsyHomeOverride / TestDevsyHomeOverrideConfigFilePath.
  • go test ./pkg/config/... (26 pass) and ./cmd/... ./pkg/provider/... ./pkg/agent/... (590 pass).

Summary by CodeRabbit

  • New Features

    • Added support for overriding the application home directory with the EnvHome environment variable.
    • Configuration, data, cache, state, runtime, and configuration-file paths now resolve under the specified directory across macOS, Linux, and Windows.
    • Required subdirectories are created automatically when an override is used.
  • Bug Fixes

    • Ensured custom home-directory settings are consistently honored across all supported platforms.

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
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 9150dd4
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a5a63d51974f400089b6c9b

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: PathManager now honors DEVSY_HOME and --home overrides.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 9150dd4
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a5a63d50aebea00089fda0d

@skevetter
skevetter marked this pull request as ready for review July 17, 2026 18:21
@skevetter skevetter changed the title fix(config): honor DEVSY_HOME / --home in PathManager fix(config): setup DEVSY_HOME / --home in PathManager Jul 17, 2026
@skevetter
skevetter merged commit ae1696d into main Jul 17, 2026
64 checks passed
@skevetter
skevetter deleted the fix/devsy-home-override-672 branch July 17, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: $DEVSY_HOME / --home having no effect?

1 participant