MKD_REQUIREMENTS not working whith multiple python package
Describe the bug
MKD_REQUIREMENTS variable does not work with multiple packages pipeline job will always fail
Occured in 1.4.1
Expected behavior
MKD_REQUIREMENTS is expected to be installed correctly by pip
Actual behavior
Executing pipeline job with MKD_REQUIREMENTS set with multiple values:
$ prepare_mkdocs
[INFO] installing requirements from variable 'MKD_REQUIREMENTS': mkdocs pymdown-extensions mkdocs-material pygments-graphql
ERROR: Invalid requirement: 'mkdocs pymdown-extensions mkdocs-material pygments-graphql'
Root cause
The root cause is the pip install instruction on the mkdocs template:
pip install "${MKD_REQUIREMENTS}" ${PIP_OPTS}
It is failing due to the quotes around MKD_REQUIREMENTS, reproduced on my laptop:
With Quotes:
PS C:\Users\\Documents\git\analytics\analytics> pip install "mkdocs pymdown-extensions mkdocs-material pygments-graphql"
ERROR: Invalid requirement: 'mkdocs pymdown-extensions mkdocs-material pygments-graphql'
Without quotes:
pip install mkdocs pymdown-extensions mkdocs-material pygments-graphql
Requirement already satisfied: mkdocs in c:\users\\appdata\local\programs\python\python39\lib\site-packages (1.2.2)
Requirement already satisfied: pymdown-extensions in c:\users\\appdata\local\programs\python\python39\lib\site-packages (8.2)
[...]
Edited by Aiw