Skip to content

stack.py: read the data file beside the script - #103

Merged
bdbarnett merged 1 commit into
mainfrom
stack-path-beside-script
Nov 5, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
stack-path-beside-script

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

A checkout outside the sibling layout, such as a git worktree, read another checkout's data/stack.json or none at all, because the path was built from the folder above the checkout. Rendering a page from a worktree could then drop a row added on that branch. The path now comes from the script's own folder, so a checkout always reads its own data.

In a worktree the old path resolved to a folder that doesn't exist and the new one resolves to the worktree's own file. In the usual sibling layout, which CI uses, both give the same file. I ran stack.py --check from the worktree against the sibling checkouts; the workflow's check runs on this PR. I didn't change --root, which still defaults to the folder above the checkout.

A checkout outside the sibling layout, such as a git worktree, read another
checkout's data/stack.json, or none, and rendered the page from that. The
script now reads the data it was committed with.
@bdbarnett
bdbarnett merged commit 4f5e337 into main Nov 5, 2026
9 checks passed
@bdbarnett
bdbarnett deleted the stack-path-beside-script branch November 5, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant