mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
graphviz: run dot in the document directory
addresses #4033 Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
This commit is contained in:
parent
1140e81df7
commit
6092f99ffb
@ -238,7 +238,8 @@ def render_dot(self, code, options, format, prefix='graphviz'):
|
||||
if format == 'png':
|
||||
dot_args.extend(['-Tcmapx', '-o%s.map' % outfn])
|
||||
try:
|
||||
p = Popen(dot_args, stdout=PIPE, stdin=PIPE, stderr=PIPE)
|
||||
p = Popen(dot_args, stdout=PIPE, stdin=PIPE, stderr=PIPE, cwd=path.dirname(
|
||||
path.join(self.builder.srcdir, self.builder.current_docname)))
|
||||
except OSError as err:
|
||||
if err.errno != ENOENT: # No such file or directory
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user