@@ -606,10 +606,11 @@ def main(
606606 packages = [f"{ package_name } =={ version } " , "jsondiff==1.2.0" ]
607607 with create_venv_with_package (packages ) as venv :
608608 subprocess .check_call (
609- [venv .env_exe , "-m" , "pip" , "install" , "-r" , os .path .join (pkg_dir , "dev_requirements.txt" )]
609+ [venv .env_exe , "-m" , "pip" , "install" , "-r" , os .path .join (pkg_dir , "dev_requirements.txt" )],
610+ cwd = pkg_dir ,
610611 )
611612 _LOGGER .info (f"Installed version { version } of { package_name } in a venv" )
612- args = [venv .env_exe , __file__ , "-t" , package_name , "-m" , target_module , "--in-venv" , "true" , "-s" , version ]
613+ args = [venv .env_exe , __file__ , "-t" , pkg_dir , "-m" , target_module , "--in-venv" , "true" , "-s" , version ]
613614 try :
614615 subprocess .check_call (args )
615616 except subprocess .CalledProcessError :
@@ -619,12 +620,12 @@ def main(
619620 public_api = build_library_report (target_module )
620621
621622 if in_venv :
622- with open ("stable.json" , "w" ) as fd :
623+ with open (os . path . join ( pkg_dir , "stable.json" ) , "w" ) as fd :
623624 json .dump (public_api , fd , indent = 2 )
624625 _LOGGER .info ("stable.json is written." )
625626 return
626627
627- with open ("current.json" , "w" ) as fd :
628+ with open (os . path . join ( pkg_dir , "current.json" ) , "w" ) as fd :
628629 json .dump (public_api , fd , indent = 2 )
629630 _LOGGER .info ("current.json is written." )
630631
0 commit comments