Skip to content

fs.promises.symlink() does not return the right Promise #18674

@addaleax

Description

@addaleax

fs.promises.symlink() returns a Promise for the FSReqPromise itself, not the actual async operation that is in progress.

I think all that's needed is a req_wrap->SetReturnValue() call in Symlink() in node_file.cc, but then again it seems like we should maybe refactor the args.GetReturnValue().Set() call in AsyncDestCall() to already do that?

(Noticed this while looking into local test failures on Windows -- developing there is a pain, so I'm not fixing this/opening a PR, so this is up for grabs.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions