From 5cd9c6b1fca549741828288febf9d5c13293847d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 22 Jan 2024 10:28:57 -0800 Subject: [PATCH] Fix `wasi.py build` after adding the `clean` subcommand. ({GH-114447) --- Tools/wasm/wasi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/wasm/wasi.py b/Tools/wasm/wasi.py index e71b0b302a55..46ecae74a9ec 100644 --- a/Tools/wasm/wasi.py +++ b/Tools/wasm/wasi.py @@ -68,7 +68,8 @@ def subdir(working_dir, *, clean_ok=False): terminal_width = 80 print("⎯" * terminal_width) print("📁", working_dir) - if clean_ok and context.clean and working_dir.exists(): + if (clean_ok and getattr(context, "clean", False) and + working_dir.exists()): print(f"🚮 Deleting directory (--clean)...") shutil.rmtree(working_dir) -- 2.47.3