From dc4849b28143e51678569714955bc1181babaadc Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 22 Jan 2024 10:07:48 -0800 Subject: [PATCH] Fix `wasi.py build` after adding the `clean` subcommand. --- 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 e71b0b302a5561..46ecae74a9ecea 100644 --- a/Tools/wasm/wasi.py +++ b/Tools/wasm/wasi.py @@ -68,7 +68,8 @@ def wrapper(context): 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)