]> git.scottworley.com Git - pinch/blobdiff - pinch.py
Fix tests after restricted mode support update
[pinch] / pinch.py
index 2ba47b22db129d06fe4d88851f5d19346cbc7d11..332d13088f301a4cca91313c80b974a97063d508 100644 (file)
--- a/pinch.py
+++ b/pinch.py
@@ -644,7 +644,11 @@ def pinCommand(args: argparse.Namespace) -> None:
 def updateCommand(args: argparse.Namespace) -> None:
     v = Verification()
     exprs: Dict[str, str] = {}
-    search_paths: List[str] = []
+    profile_manifest = os.path.join(args.profile, "manifest.nix")
+    search_paths: List[str] = [
+        "-I", "pinch_profile=" + args.profile,
+        "-I", "pinch_profile_manifest=" + os.readlink(profile_manifest)
+    ] if os.path.exists(profile_manifest) else []
     config = {
         section: read_pinned_config_section(section, conf) for section,
         conf in read_config_files(
@@ -674,6 +678,7 @@ def updateCommand(args: argparse.Namespace) -> None:
         '--file',
         '<nix/unpack-channel.nix>',
         '--install',
+        '--remove-all',
     ] + search_paths + ['--from-expression'] + [
         exprs[name] % name for name in sorted(exprs.keys())]
     if args.dry_run: