Skip to content

Commit 1f4f9f3

Browse files
authored
Merge pull request #303 from machow/fix-cwd-path
fix: really add cwd to sys path this time
2 parents c4cbbea + e925f5b commit 1f4f9f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

quartodoc/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def build(config, filter, dry_run, watch, verbose):
192192
if dry_run:
193193
pass
194194
else:
195+
# add current directory to path, and then temporarily switch directories.
196+
# this supports the case where a user is depending on the current directory
197+
# for imports
198+
sys.path.append(os.getcwd())
195199
with chdir(Path(config).parent):
196200
if watch:
197201
pkg_path = get_package_path(builder.package)

0 commit comments

Comments
 (0)