Skip to content

Commit e5d2823

Browse files
authored
Merge pull request #38 from Holzhaus/fix-config-restore
sphinx: Fix restoring of previous config values
2 parents b5588cd + fd38dad commit e5d2823

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sphinx_multiversion/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def main(argv=None):
284284
"outputdir": os.path.join(
285285
os.path.abspath(args.outputdir), outputdir
286286
),
287-
"confdir": confdir_absolute,
287+
"confdir": confpath,
288288
"docnames": list(project.discover()),
289289
}
290290

@@ -320,7 +320,7 @@ def main(argv=None):
320320
"-D",
321321
"smv_current_version={}".format(version_name),
322322
"-c",
323-
data["confdir"],
323+
confdir_absolute,
324324
data["sourcedir"],
325325
data["outputdir"],
326326
*args.filenames,

sphinx_multiversion/sphinx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ def config_inited(app, config):
170170
app.connect("html-page-context", html_page_context)
171171

172172
# Restore config values
173-
old_config = sphinx_config.Config.read(app.confdir)
173+
old_config = sphinx_config.Config.read(data["confdir"])
174174
old_config.pre_init_values()
175175
old_config.init_values()
176-
config.version = old_config.version
177-
config.release = old_config.release
176+
config.version = data["version"]
177+
config.release = data["release"]
178178
config.today = old_config.today
179179
if not config.today:
180180
config.today = sphinx_i18n.format_date(

0 commit comments

Comments
 (0)