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)