Skip to content

Commit 0b217aa

Browse files
authored
feat(devex): hogli doctor:disk cleanup (#41067)
1 parent ee4822d commit 0b217aa

File tree

3 files changed

+921
-5
lines changed

3 files changed

+921
-5
lines changed

.flox/env/manifest.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,16 @@ fi
8787
8888
echo -e "\033[1;36m🔧 Configuring development environment...\033[0m"
8989
90-
# Clean up old Flox log files (older than 7 days)
90+
# Clean up old Flox log files (older than 7 days) via hogli
9191
echo -e " \033[1;34m🧹 Flox logs\033[0m"
92-
find "$FLOX_ENV_PROJECT/.flox/log" -name "*.log" -type f -mtime +7 -delete 2>/dev/null || true
93-
echo -e " \033[32m✅ Flox logs cleaned up\033[0m"
92+
if [ -f "$FLOX_ENV_PROJECT/bin/hogli" ]; then
93+
"$FLOX_ENV_PROJECT/bin/hogli" doctor:disk --area=flox-logs --yes 2>/dev/null || true
94+
echo -e " \033[32m✅ Flox logs cleaned up\033[0m"
95+
else
96+
# Fallback if hogli not available yet
97+
find "$FLOX_ENV_PROJECT/.flox/log" -name "*.log" -type f -mtime +7 -delete 2>/dev/null || true
98+
echo -e " \033[32m✅ Flox logs cleaned up (fallback)\033[0m"
99+
fi
94100
95101
# Ensure Python virtual environment - Python version is defined in pyproject.toml
96102
echo -e " \033[1;34m🐍 Python packages\033[0m"

common/hogli/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ def my_command(path, flag):
3131

3232
from __future__ import annotations
3333

34-
3534
# Add your Click commands below this line
3635
# Example command (remove or keep as reference):
37-
3836
# @cli.command(name="example:hello", help="Example Click command")
3937
# @click.argument('name')
4038
# @click.option('--greeting', default='Hello', help='Greeting to use')
4139
# def example_hello(name: str, greeting: str) -> None:
4240
# """Say hello to someone."""
4341
# click.echo(f"{greeting}, {name}!")
42+
# Import commands from other modules to register them
43+
from hogli import doctor # noqa: F401

0 commit comments

Comments
 (0)