From ce41d45c9fb1e6cf6c534b7ee0a8c46302820167 Mon Sep 17 00:00:00 2001 From: Zakarya Date: Wed, 31 Jul 2024 14:12:33 -0700 Subject: [PATCH] Fix make -r --- make | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/make b/make index d3de608..7eb5f67 100755 --- a/make +++ b/make @@ -72,9 +72,10 @@ if len(sys.argv) != 1: if sys.argv[1] == "-r": sys.argv.pop(1) print("Removing output directory...") - shutil.rmtree("output") # Scary - print("Output directory removed") - sys.exit() + if os.path.exists("output"): + shutil.rmtree("output") # Scary + if len(sys.argv) == 1: + sys.exit() if sys.argv[1] == "all": if len(sys.argv) == 3: