Closed phated closed 1 year ago
Thanks for the suggestion! I've merged it and I'll rebase once #180 lands.
It should be OK to rebase this now.
Thanks @cjihrig! This has been rebased now. Cheers 🍻
Excellent! We're actually using this through wasm-micro-runtime
that uses uvwasi as an experimental WASI backend. And I'm writing bindings for OCaml, which is where I encountered this bug.
Oh that's cool. In that case, you won't have to wait for a Node release (which would probably be next year). I'll get a uvwasi release out today.
This is published in v0.0.14.
When uvwasi is used on Windows, it might be used in non-"ConsoleMode" and the
uv_guess_handle
function can return two different values forFILE_TYPE_CHAR
because of that difference, see https://github.com/libuv/libuv/blob/v1.x/src/win/handle.c#L42-L47This function can also return
UV_FILE
in the case ofFILE_TYPE_DISK
but I assume that a disk file will properly stat and there isn't a good way to figure out which one is being returned.This fixes #157 (took me about a month of debugging)