Skip to content

Error: EISDIR: illegal operation on a directory, fstat #18

@jtenner

Description

@jtenner

Hello! Great work on this project by the way.

In reference to #17 where the writes to stdout and stderr were returning 31.

Looks like

const stat = (wasi, fd) => {
  ...
  const stats = fs.fstatSync(entry.real);
  ...
};

Seems to be the trouble on windows. :)

When the file descriptor is 0, 1 or 2, it looks like an error code EISDIR is thrown because it's not an actual file descriptor on windows.

Perhaps there is a good way this can be fixed? I could help submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions