mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 22:04:43 +00:00
fix: enhance local snapshot warning and improve disk space calculation for macOS
This commit is contained in:
@@ -171,7 +171,12 @@ detect_architecture() {
|
||||
# Get free disk space on root volume
|
||||
# Returns: human-readable string (e.g., "100G")
|
||||
get_free_space() {
|
||||
command df -h / | awk 'NR==2 {print $4}'
|
||||
local target="/"
|
||||
if [[ -d "/System/Volumes/Data" ]]; then
|
||||
target="/System/Volumes/Data"
|
||||
fi
|
||||
|
||||
df -h "$target" | awk 'NR==2 {print $4}'
|
||||
}
|
||||
|
||||
# Get Darwin kernel major version (e.g., 24 for 24.2.0)
|
||||
|
||||
Reference in New Issue
Block a user