1212from doit .tools import create_folder
1313
1414from elm_doc import elm_platform
15- from elm_doc import elm_package_overlayer_path
15+ from elm_doc import elm_package_overlayer_env
1616from elm_doc import elm_package
1717from elm_doc .elm_package import ElmPackage , ModuleName
1818from elm_doc import page_template
@@ -59,7 +59,6 @@ def build_package_docs_json(
5959 {'exposed-modules' : package_modules },
6060 package .description ,
6161 ))
62- overlayer_path = elm_package_overlayer_path ()
6362 with TemporaryDirectory () as tmpdir :
6463 root_path = Path (tmpdir )
6564
@@ -75,16 +74,10 @@ def build_package_docs_json(
7574 # todo: support windows if we want to
7675 output_path = '/dev/null'
7776
78- # todo: make overlayer support windows if we want to (can we?)
79- env = dict (ChainMap (
80- {
81- 'USE_ELM_PACKAGE' : str (overlayed_elm_package_path ),
82- 'INSTEAD_OF_ELM_PACKAGE' : str (elm_package .description_path (package )),
83- 'DYLD_INSERT_LIBRARIES' : overlayer_path ,
84- 'LD_PRELOAD' : overlayer_path ,
85- },
86- os .environ ,
87- ))
77+ env = elm_package_overlayer_env (
78+ str (overlayed_elm_package_path ),
79+ str (elm_package .description_path (package )),
80+ os .environ )
8881 subprocess .check_call (
8982 [str (elm_make ), '--yes' , '--docs' , str (output_path ), '--output' , '/dev/null' ],
9083 cwd = str (package .path ),
0 commit comments