Skip to content

Fix Windows zero-native init path resolution error#55

Open
edengilbertus wants to merge 1 commit into
vercel-labs:mainfrom
edengilbertus:fix-windows-init-path-resolution
Open

Fix Windows zero-native init path resolution error#55
edengilbertus wants to merge 1 commit into
vercel-labs:mainfrom
edengilbertus:fix-windows-init-path-resolution

Conversation

@edengilbertus
Copy link
Copy Markdown

Fixes #53.

Cause:
zero-native initialization tries to locate its source files by taking its executable path (an absolute path) and joining it with src/root.zig. It passed this to std.Io.Dir.cwd().openFile(). On macOS and Linux, the underlying POSIX openat allows absolute paths, ignoring the directory file descriptor. However, on Windows, NtCreateFile rejects an absolute path when a parent directory handle (RootDirectory) is provided, causing cwd().openFile to throw an error. This caused hasFrameworkRoot to silently catch the error and return false on Windows.

Fix:
Explicitly use std.Io.Dir.openFileAbsolute if std.fs.path.isAbsolute(root_zig) is true, bypassing the directory handle and ensuring the absolute path is correctly read on Windows.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@edengilbertus is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

window11 build faild!

1 participant