-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master] log directory not created in time when running with pre-made configs #1865
Comments
simple |
Is that not what is happening with the below code? archinstall/archinstall/__init__.py Line 53 in 768cb15
archinstall/archinstall/lib/output.py Lines 138 to 148 in 768cb15
I think this might be the same race condition I warned about here #1831 (comment) just with the directory existing rather than permissions. |
The error here isn't the actual log problem that is just the result of the upper error which is the actual problem But then yes, the logging will break because the setup of the logging hasn't actually happened. |
We should probably move the first log instance + creation to the very start of archinstall when we log the sysinfo. The disk thing was a separate issue that I'm working on while experimenting with |
I will yield to @codefiles suggestions to always verify log permissions and the directory. All options that went through my head seemed worse :) I raised a PR to address it |
I really would not consider that yielding to me. What I have suggested is to verify when writing to the log, which is what was done prior to 89cefb9. To me what you implemented previously with |
I wasn't really trying to optimise it for time, but it just feels wrong performing a file permission check every time when writing to a file that was all I was trying to avoid |
There is a way where checking once is adequate. 🤪 with log_file.open('a') as fp:
rest_of_program(fp) |
The text was updated successfully, but these errors were encountered: