Skip to content

Fix build when no release exists - #92

Merged
wjt merged 1 commit into
mainfrom
wjt/push-pnzroouxvuyo
May 11, 2026
Merged

Fix build when no release exists#92
wjt merged 1 commit into
mainfrom
wjt/push-pnzroouxvuyo

Conversation

@wjt

@wjt wjt commented May 11, 2026

Copy link
Copy Markdown
Member

When no release exists, the default branch is placed at the root of the site:

if is_default and not have_toplevel_build:
    branch_dir = dest_dir

branches_dir is a child of dest_dir:

branches_dir = dest_dir / "branches"

By default, x.relative_to(y) fails if x is a parent of y:

ValueError: '/home/runner/work/_actions/endlessm/amalgamate-pages/v2/_build'
is not in the subpath of
'/home/runner/work/_actions/endlessm/amalgamate-pages/v2/_build/branches'

This is a security feature. However in this case, as in a couple of other places in the script, it is correct to use walk_up=True to allow using "../" in the path.

Resolves #91

When no release exists, the default branch is placed at the root of the site:

    if is_default and not have_toplevel_build:
        branch_dir = dest_dir

branches_dir is a child of dest_dir:

    branches_dir = dest_dir / "branches"

By default, x.relative_to(y) fails if x is a parent of y:

    ValueError: '/home/runner/work/_actions/endlessm/amalgamate-pages/v2/_build'
    is not in the subpath of
    '/home/runner/work/_actions/endlessm/amalgamate-pages/v2/_build/branches'

This is a security feature. However in this case, as in a couple of other places
in the script, it is correct to use walk_up=True to allow using "../" in the path.

Resolves #91
@wjt

wjt commented May 11, 2026

Copy link
Copy Markdown
Member Author

@manuq FYI I think this will fix your piqui-piqui issue.

@wjt
wjt merged commit 44f9092 into main May 11, 2026
1 check passed
@wjt
wjt deleted the wjt/push-pnzroouxvuyo branch May 11, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes if no release exists

1 participant