From 74f456ab07f1c5499881a7950c2def1ac73aad28 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Sat, 2 Nov 2024 14:43:40 -0700 Subject: [PATCH] check dir --- mesop/env/env.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesop/env/env.py b/mesop/env/env.py index 3a82914f..ccc5b642 100644 --- a/mesop/env/env.py +++ b/mesop/env/env.py @@ -12,6 +12,10 @@ raise MesopDeveloperException( f"MESOP_APP_BASE_PATH must be an absolute path, but got {MESOP_APP_BASE_PATH} instead." ) + if not os.path.isdir(MESOP_APP_BASE_PATH): + raise MesopDeveloperException( + f"MESOP_APP_BASE_PATH is not a valid directory: {MESOP_APP_BASE_PATH}" + ) print(f"MESOP_APP_BASE_PATH set to {MESOP_APP_BASE_PATH}")