Skip to content

Conversation

@ehuss
Copy link
Contributor

@ehuss ehuss commented Dec 31, 2020

Custom renderers that explicitly set the command to a relative path was using the wrong base path. On Windows, it was relative to the current directory, and on Unix it was relative to the renderer output directory (see rust-lang/rust#37868 for this unfortunate behavior). Neither are correct, they should be relative to the book root. This changes it so that it is relative to the book root, and has a legacy warning for the old behavior of relative to the output directory. This uses absolute paths to avoid problems with current_dir().

@ehuss
Copy link
Contributor Author

ehuss commented Dec 31, 2020

Note to self: The preprocessor custom command is relative to the current directory, but it should be relative to the book root. Unfortunately the Preprocessor::supports_renderer API does not pass in a context to get the book root, so I don't think it is fixable without a breaking API change. Will file an issue later about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant