From e925f5b6db0b2e7695569022751f368277f1bf01 Mon Sep 17 00:00:00 2001 From: Michael Chow Date: Mon, 23 Oct 2023 11:43:02 -0400 Subject: [PATCH] fix: really add cwd to sys path this time --- quartodoc/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quartodoc/__main__.py b/quartodoc/__main__.py index 4f7521c9..6fcca365 100644 --- a/quartodoc/__main__.py +++ b/quartodoc/__main__.py @@ -192,6 +192,10 @@ def build(config, filter, dry_run, watch, verbose): if dry_run: pass else: + # add current directory to path, and then temporarily switch directories. + # this supports the case where a user is depending on the current directory + # for imports + sys.path.append(os.getcwd()) with chdir(Path(config).parent): if watch: pkg_path = get_package_path(builder.package)