Skip to content

h3 docs resolves its docs directory as a URL, not a filesystem path #1530

Description

@MohammedAlkindi

h3 docs is broken on Windows, and on any install path containing a space.

bin/h3.mjs:19 builds the docs directory with URL.pathname, which is a URL component rather than a filesystem path. It keeps the slash before the drive letter, percent-encodes the rest, and is then interpolated unquoted.

Windows, node 24.18.0, v2.0.1-rc.27:

$ node bin/h3.mjs docs
Error: ENOENT: no such file or directory, scandir 'C:\C:\...\dist\docs'
Error: Command failed: bun x mdzilla /C:/.../dist/docs

Every other file URL in this repo already uses fileURLToPath. Switching to it plus quoting fixes both halves, and I have that working locally with a regression test that copies the CLI into a directory with a space in the name.

Happy to open a PR if you want it. Checking first per your note on #1507: the analysis was agent-assisted, and I ran the repro, the fix and the suite on this machine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions