fix(macos): check disk space on INSTALL_DIR instead of $HOME#103
Merged
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom Mar 9, 2026
Merged
Conversation
The disk-space preflight always checked $HOME, which reports the wrong volume when the user installs to an external drive (DS_INSTALL_DIR). - Pass $INSTALL_DIR to test_disk_space() at both call sites - Add parent-directory traversal so df resolves to an existing mount even when the target directory hasn't been created yet Fixes #97 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 9, 2026
Muhammad-Sulleman
added a commit
to Muhammad-Sulleman/DreamServer
that referenced
this pull request
Mar 10, 2026
- Move disk space calculation logic into lib/disk.sh for reuse - Replace duplicated ~30-line block in Phase 1 and Phase 2 with single calculate_needed_disk() call from lib/disk.sh - Fix disk checks to use $INSTALL_DIR instead of $HOME to correctly support external drive installs (restores fix from PR Light-Heart-Labs#103)
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
$INSTALL_DIR(not$HOME) totest_disk_space()at both call sites ininstall-macos.shtest_disk_space()sodfresolves to the nearest existing mount point when the target directory hasn't been created yet (first install)The disk-space preflight always checked
$HOME, which reports the wrong volume when the user setsDS_INSTALL_DIRto an external drive. This caused installs to proceed even when the target volume was full, or to block installs when the boot volume was full but the target had plenty of space.Safety
$HOME/dream-server): traversal reaches$HOME(exists) → identical behavior to beforedfreports the correct volumedirname "/"=/, which exists → loop always terminatesTest plan
DS_INSTALL_DIR(unchanged behavior)DS_INSTALL_DIRpointing to an external volume — verify disk check reports that volume's free spaceDS_INSTALL_DIRpointing to a non-existent nested path (/Volumes/ExtDrive/deep/nested/path) — verify traversal resolves to/Volumes/ExtDriveFixes #97
🤖 Generated with Claude Code