mdBook
mdBook copied to clipboard
Providing your own command for a preprocessor doesn't evaluate $ENV_VARS
Problem
Currently, there is no way to define a custom preprocessor in case the command-line arguments contain an environment variable which needs to be evaluated as a part of the script's path.
Steps
Adding a preprocessor to a book.toml
:
[preprocessor.example]
command = "python $HOME/example.py" # that doesn't work
mdbook build fails with an error:
Python: can't open file '$HOME/example.py' # please note that $HOME env var was not evaluated
Using a relative path or an absolute path works fine:
command = "python example.py" # that works
command = "python /absolute/path/example.py" # that works fine
command = "python ../../relative/path/example.py" # that works as well
Possible Solution(s)
No response
Notes
No response
Version
mdbook v0.4.27
@rustbot claim