From 0add01839e837e583fc5e0b6292cd16e045967e0 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 24 Jun 2024 23:54:21 -0400 Subject: [PATCH] update Cargo.lock after other hashes as `update_cargo_lock()` overrides the top level derivations, this will cause hash mismatch errors in the event of other FODs being used in the environment (i.e., `pnpmDeps`) during updates if they also need to be updated --- nix_update/update.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nix_update/update.py b/nix_update/update.py index 486e678..b2c886a 100644 --- a/nix_update/update.py +++ b/nix_update/update.py @@ -384,11 +384,6 @@ def update(opts: Options) -> Package: if package.cargo_deps: update_cargo_deps_hash(opts, package.filename, package.cargo_deps) - if isinstance(package.cargo_lock, CargoLockInSource) or isinstance( - package.cargo_lock, CargoLockInStore - ): - update_cargo_lock(opts, package.filename, package.cargo_lock) - if package.composer_deps: update_composer_deps_hash(opts, package.filename, package.composer_deps) @@ -404,4 +399,9 @@ def update(opts: Options) -> Package: if package.maven_deps: update_maven_deps_hash(opts, package.filename, package.maven_deps) + if isinstance(package.cargo_lock, CargoLockInSource) or isinstance( + package.cargo_lock, CargoLockInStore + ): + update_cargo_lock(opts, package.filename, package.cargo_lock) + return package