Skip to content

Commit 14d841c

Browse files
committed
current_work_directory
1 parent 146bd67 commit 14d841c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

reflex/utils/exec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ def get_app_file() -> Path:
238238
Raises:
239239
ImportError: If the app module is not found.
240240
"""
241+
current_working_dir = str(Path.cwd())
242+
if current_working_dir not in sys.path:
243+
# Add the current working directory to sys.path
244+
sys.path.insert(0, current_working_dir)
241245
module_spec = importlib.util.find_spec(get_app_module())
242246
if module_spec is None:
243247
raise ImportError(

0 commit comments

Comments
 (0)