Skip to content

Commit

Permalink
add warning when @platform='runestone' is inconsistent with publicati…
Browse files Browse the repository at this point in the history
…on platform/@host (#834)

* add warning when @platform='runestone' is inconsistent with publication platform/@host

* format
  • Loading branch information
oscarlevin authored Sep 24, 2024
1 parent 306b9b0 commit c204acd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pretext/project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,13 @@ def build(
assert self.output_filename is None
# This is equivalent to setting `<platform host="runestone">` in the publication file.
stringparams_copy.update({"host-platform": "runestone"})
if (
core.get_platform_host(self.publication_abspath().as_posix())
!= "runestone"
):
log.warning(
"The platform host in the publication file is not set to runestone. Since the requested target has @platform='runestone', we will override the publication file's platform host."
)
core.html(
xml=self.source_abspath(),
pub_file=self.publication_abspath().as_posix(),
Expand Down

0 comments on commit c204acd

Please sign in to comment.