From 92160cf524523fcd0d766019eb485aa20190aaee Mon Sep 17 00:00:00 2001 From: rgthree Date: Wed, 13 Sep 2023 21:44:01 -0400 Subject: [PATCH] Only remove js directories if they exist. --- __dev__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/__dev__.py b/__dev__.py index 9ed1af1..3aab20d 100644 --- a/__dev__.py +++ b/__dev__.py @@ -6,10 +6,11 @@ THIS_DIR=os.path.dirname(os.path.abspath(__file__)) DIR_DEV_JS=os.path.abspath(f'{THIS_DIR}/js') DIR_WEB_JS=os.path.abspath(f'{THIS_DIR}/../../web/extensions/rgthree') -shutil.rmtree(DIR_DEV_JS) +if os.path.exists(DIR_DEV_JS): + shutil.rmtree(DIR_DEV_JS) subprocess.run(["./node_modules/typescript/bin/tsc"]) - -shutil.rmtree(DIR_WEB_JS) +if os.path.exists(DIR_WEB_JS): + shutil.rmtree(DIR_WEB_JS) shutil.copytree(DIR_DEV_JS, DIR_WEB_JS, dirs_exist_ok=True) \ No newline at end of file