feat: add free disk space startup check #351
Reference in New Issue
Block a user
Delete Branch "cravl-dev/fix-331"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #331 by adding a startup check for at least 5GB of free space in ${HOME}.
I like the idea and it seems like a rather easy approach and solution to the issue.
Though im not sure if we should do this check everytime after starting KIAUH.
Imagine user has everthing installed and just want to update a component. He would then be shown the message and the script exits, leaving the user unable to do anything. Even uninstalling something to free space up would be impossible.
I think the check should be done somewhere later. Maybe in the install and update menu itself? we could check if any component is already installed, and if its a completely clean system that has no klipper, moonraker etc installed, we could assume the dependencies are also missing and show the warning in red. i would still allow the user to proceed i think. he has been warned, right?
a second case would be to check if anything is installed at all, and if it is but the available disk space is below 5gb, we could print the message in yellow for signaling something like "hey you're likely running out of disk space soon". but let the user proceed here as well.
last but not least: is $HOME really the correct directory to check? don't system packages go onto another partition usually? i don't know that from the top of my head right now.
I'm converting this to a draft while I mess with it some more, I have a couple test cases that still aren't working right and I want to refactor a bit to simplify things.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.