@@ -143,7 +143,7 @@ async def commit_changes(
143143
144144
145145async def check_changes (package : Dict , worktree : str , update_info : str ):
146- if "commit" in package [ "supportedFeatures" ] :
146+ if "commit" in package . get ( "supportedFeatures" , []) :
147147 changes = json .loads (update_info )
148148 else :
149149 changes = [{}]
@@ -161,13 +161,11 @@ async def check_changes(package: Dict, worktree: str, update_info: str):
161161
162162 if "newVersion" not in changes [0 ]:
163163 attr_path = changes [0 ]["attrPath" ]
164+ logging .info (f"Current worktree: { worktree } " )
164165 obtain_new_version_process = await check_subprocess (
165- "nix-instantiate" ,
166- "--expr" ,
167- f"with import ./. {{}}; lib.getVersion { attr_path } " ,
168- "--eval" ,
169- "--strict" ,
170- "--json" ,
166+ "nix" ,
167+ "eval" ,
168+ f".#packages.x86_64-linux.{ attr_path } .version" ,
171169 stdout = asyncio .subprocess .PIPE ,
172170 stderr = asyncio .subprocess .PIPE ,
173171 cwd = worktree ,
@@ -196,7 +194,7 @@ async def check_changes(package: Dict, worktree: str, update_info: str):
196194
197195async def merge_changes (
198196 merge_lock : asyncio .Lock ,
199- package : Package ,
197+ package : Dict ,
200198 update_info : str ,
201199 temp_dir : Optional [Tuple [str , str ]],
202200) -> None :
@@ -226,7 +224,9 @@ async def updater(
226224 # A sentinel received, we are done.
227225 return
228226
229- if not ("attrPath" in package or "commit" in package ["supportedFeatures" ]):
227+ if not (
228+ "commit" in package .get ("supportedFeatures" , []) or "attrPath" in package
229+ ):
230230 temp_dir = None
231231
232232 await run_update_script (dir_root , merge_lock , temp_dir , package , keep_going )
0 commit comments