You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unsafeVendor allows vendor folders Windows reads as .patchbook #386
A vendor folder can be named so that Windows reads it as .patchbook.
unsafeVendor (src/book.ts:226) refuses a vendor folder inside .git in any spelling git or the OS reads as .git, such as .git. or a/.git /x. For .patchbook it only folds case. It returns null for these names:
.patchbook.
.patchbook /x
.patchbook./x
.patchbook:x
Windows drops a trailing dot or space from a name, so the first three name .patchbook. .patchbook:x is an alternate data stream on .patchbook. The check for output folders (Book#reservedOutput) refuses the same spellings, so the two checks disagree.
Steps
At a37b015 on Linux, in the verify-patchbook sandbox, each of these exits 0 and writes the vendored copy under the name given:
patchbook track extra <url> --vendor '.patchbook.' in a fork
the same in a folder layout
patchbook init --output-to out --vendor '.patchbook.' in a folder layout
All four names behave the same, 12 of 12 runs. On Windows the copy would land in the patchbook's own folder, and a later sync replaces the vendored copy. That part is reasoned from the code. It wasn't run on Windows.
Expected
The same refusal as for .git.: is inside .patchbook, for every spelling that reservedOutput treats as .patchbook.
A second probe agrees, and main at 0688792 behaves the same.
inPatchbook (src/book.ts:75) already treats these spellings as .patchbook. The [output] to check (line 203) and reservedOutput (line 568) use it. unsafeVendor (lines 226 to 230) uses a plain folded prefix instead. .patchbook/x and .PATCHBOOK/x are refused as expected:
the vendored copy of extra (.patchbook/x) is inside .patchbook. Every sync replaces it. Change vendor for extra to a folder inside the repo, other than .patchbook and .git.
Activity
willgosnold commentedon Oct 27, 2026
A second probe agrees, and
mainat0688792behaves the same.inPatchbook(src/book.ts:75) already treats these spellings as.patchbook. The[output] tocheck (line 203) andreservedOutput(line 568) use it.unsafeVendor(lines 226 to 230) uses a plain folded prefix instead..patchbook/xand.PATCHBOOK/xare refused as expected:🤖 Generated with Claude Code