fix(site-publish): close split migration boundaries
Authored-By: OpenAI (GPT-5) <noreply@openai.com>
This commit is contained in:
+9
-1
@@ -432,7 +432,15 @@ def validate_artifact_inputs(site_dir, cfg):
|
||||
root = Path(site_dir).resolve()
|
||||
sources = []
|
||||
for artifact in cfg["artifacts"]:
|
||||
source = (root / artifact["content_dir"]).resolve()
|
||||
declared = root
|
||||
for component in Path(artifact["content_dir"]).parts:
|
||||
declared /= component
|
||||
if declared.is_symlink():
|
||||
raise ConfigError(
|
||||
f"artifact {artifact['name']} content_dir contains symlink component: "
|
||||
f"{declared.relative_to(root)}"
|
||||
)
|
||||
source = declared.resolve()
|
||||
if source != root and root not in source.parents:
|
||||
raise ConfigError(
|
||||
f"artifact {artifact['name']} content_dir resolves outside the repository"
|
||||
|
||||
Reference in New Issue
Block a user