You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now build_html.py is going to delete the folder html_site, and rebuild it. Is this done safely?
I'm wondering if the script might ever be run from a context where the cwd is not the project root. It will look for a folder called html_site, and delete it and rebuild it. That would be terrible if the user had a different directory of that name, and lost it by running this script.
Would it be better to build an absolute path to this project's html_site, and use that path? Maybe get the absolute path to build_html.py, and use that to build the absolute path to html_site? Here are the relevant lines from build_html.py:
print("\nDeleting current html_site directory...")
try:
rmtree('html_site')
print(" Deleted html_site.")
exceptFileNotFoundError:
print(" No html_site directory found.")
The text was updated successfully, but these errors were encountered:
Right now build_html.py is going to delete the folder html_site, and rebuild it. Is this done safely?
I'm wondering if the script might ever be run from a context where the cwd is not the project root. It will look for a folder called html_site, and delete it and rebuild it. That would be terrible if the user had a different directory of that name, and lost it by running this script.
Would it be better to build an absolute path to this project's html_site, and use that path? Maybe get the absolute path to build_html.py, and use that to build the absolute path to html_site? Here are the relevant lines from build_html.py:
The text was updated successfully, but these errors were encountered: