File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,16 @@ def run(self):
118
118
# change to that working directory before running the desired command.
119
119
# The working directory is omitted from the final output.
120
120
# TODO: PATCHED
121
- includes_dir = Path ('src/_includes/cwl/' )
122
- if not includes_dir .exists ():
123
- # You can run Sphinx from the root directory, with `make watch`
124
- # for instance, or from the src directory (RTD does that).
125
- includes_dir = Path ('_includes/cwl' )
126
- working_directory = self .options .get ('working-directory' , includes_dir )
121
+ working_directory = self .options .get ('working-directory' , 'src/_includes/cwl/' )
127
122
if working_directory == '' :
128
123
# subprocess default value, so that we can disable it if needed.
129
124
working_directory = None
125
+ else :
126
+ # You can run Sphinx from the root directory, with `make watch`
127
+ # for instance, or from the src directory (RTD does that).
128
+ working_directory_path = Path (working_directory )
129
+ if not working_directory_path .exists () and str (working_directory_path ).startswith ('src/' ):
130
+ working_directory = Path (working_directory [4 :])
130
131
131
132
# Get the command output
132
133
command = " " .join (self .arguments )
You can’t perform that action at this time.
0 commit comments