summaryrefslogtreecommitdiff
path: root/bin/just-import-git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/just-import-git.py')
-rwxr-xr-xbin/just-import-git.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/just-import-git.py b/bin/just-import-git.py
index 7cf3f7c7..288ea35b 100755
--- a/bin/just-import-git.py
+++ b/bin/just-import-git.py
@@ -282,14 +282,16 @@ def rewrite_repo(repo_spec: Json,
if absent and isinstance(repo, dict):
repo["pragma"] = dict(repo.get("pragma", {}), **{"absent": True})
new_spec["repository"] = repo
- for key in ["target_root", "rule_root", "expression_root"]:
- if key in repo_spec:
- new_spec[key] = assign[repo_spec[key]]
- for key in ["target_file_name", "rule_file_name", "expression_file_name"]:
- if key in repo_spec:
- new_spec[key] = repo_spec[key]
- # rewrite bindings, if actually needed to be imported
+ # rewrite other roots and bindings, if actually needed to be imported
if not as_layer:
+ for key in ["target_root", "rule_root", "expression_root"]:
+ if key in repo_spec:
+ new_spec[key] = assign[repo_spec[key]]
+ for key in [
+ "target_file_name", "rule_file_name", "expression_file_name"
+ ]:
+ if key in repo_spec:
+ new_spec[key] = repo_spec[key]
bindings = repo_spec.get("bindings", {})
new_bindings = {}
for k, v in bindings.items():