Isolate fetched source override from tests
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 42s
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 42s
This commit is contained in:
parent
e33b98a1e6
commit
e7b26ff158
1 changed files with 6 additions and 6 deletions
|
|
@ -150,14 +150,14 @@ def build(
|
|||
manifest = load_manifest(manifest_path)
|
||||
as_of = as_of or dt.date.today()
|
||||
source_root = os.environ.get("POLICY_NEXUS_SOURCE_ROOT")
|
||||
repository_paths = {
|
||||
name: (
|
||||
(Path(source_root) / name).resolve()
|
||||
if source_root
|
||||
repository_paths = {}
|
||||
for name, config in manifest["repositories"].items():
|
||||
fetched = (Path(source_root) / name).resolve() if source_root else None
|
||||
repository_paths[name] = (
|
||||
fetched
|
||||
if fetched is not None and fetched.is_dir()
|
||||
else (manifest_path.parent / config["path"]).resolve()
|
||||
)
|
||||
for name, config in manifest["repositories"].items()
|
||||
}
|
||||
output_parent = output.resolve().parent
|
||||
output_parent.mkdir(parents=True, exist_ok=True)
|
||||
temporary = Path(tempfile.mkdtemp(prefix=f".{output.name}-", dir=output_parent))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue