Repository navigation
feat(config): add appropriate default directories for non-Linux platforms - #900
Merged
foxcpp merged 1 commit intoNov 15, 2026
Merged
Conversation
foxcpp
self-requested a review
November 11, 2026 11:51
foxcpp
reviewed
Nov 11, 2026
foxcpp
reviewed
Nov 11, 2026
…orms Introduce platform-specific directory defaults for Windows and Darwin/BSD: - Windows: default configuration in %ProgramData%\maddy, state in %ProgramData%\maddy\data, runtime in %ProgramData%\maddy\run, and libexec in %ProgramFiles%\maddy with C:\ fallback helpers - Darwin / BSD: default runtime directory to /var/run/maddy (since /run does not exist) and libexec to /usr/lib/maddy - Fix handleSignals signature in signal_nonposix.go to allow non-posix compilation in reload loop - Add unit tests verifying default directory constants and Windows path helper logic Fixes foxcpp#290 Assisted-by: Gemini CLI Agent (gemini-2.5-pro) Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
AdamMagued
force-pushed
the
feat/non-linux-default-directories
branch
from
November 12, 2026 22:09
f83d355 to
e3f93c9
Compare
Contributor
Author
lmk if you need any adjustments |
foxcpp
approved these changes
Nov 15, 2026
Owner
|
Thanks! |
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.
This change introduces platform-specific directory defaults for Windows and Darwin/BSD systems, addressing #290.
Summary of changes
directories_windows.go: Define Windows directory defaults with%ProgramData%\\maddyfor config,%ProgramData%\\maddy\\datafor state,%ProgramData%\\maddy\\runfor runtime, and%ProgramFiles%\\maddyfor libexec; fallback toC:\\roots if environment variables are absent, and preserve build-time-ldflags -Xoverridesdirectories_bsd.go: Configure BSD and Darwin defaults targeting/var/run/maddyfor runtime directory (as/runis unavailable on macOS and BSD systems) and/usr/local/lib/maddyfor libexecdirectories.go: Restrict Linux/Unix fallback defaults with updated build tags excluding Windows and BSD/Darwin targetssignal_nonposix.go: UpdatehandleSignalssignature to returnboolso non-posix builds compile cleanly within the reload loopdirectories_test.go: Add test asserting non-empty directory variables and matching paths per platformdirectories_windows_test.go: Add unit tests for Windows environment path resolution, fallbacks, and linker overridesFixes #290
Assisted-by: Gemini CLI Agent (gemini-2.5-pro)
lmk if you need any adjustments