From 3b2117a3ff0c74c8cf3dc27bbe9a3105428d03d5 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 19 Jan 2022 11:25:41 -0800 Subject: [PATCH] Support restricted mode: Allow manifest access with search paths. --- Changelog | 2 +- pinch.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index de62e83..a0932a9 100644 --- a/Changelog +++ b/Changelog @@ -3,7 +3,7 @@ - Deprecate pinch. - Show the channel URL being fetched. - Use nix 2.3 because 2.4 broke . -- Support restricted mode: Allow tarball access with search paths. +- Support restricted mode: Allow tarball and manifest access with search paths. - Announce test names as they are run. diff --git a/pinch.py b/pinch.py index 2ba47b2..f95323f 100644 --- 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( -- 2.44.1