Skip to content

fs: passing '~' to realpathSync causes error in the REPL #36493

Description

@RaisinTen

What is the bug?

Every time in the REPL:

>console.log(require('fs').realpathSync('~'));
Uncaught:
Error: ENOENT: nosuchfileordirectory,lstat'/home/raisinten/Desktop/universe/temp/project/~'atObject.realpathSync(node:fs:1753:7){errno: -2,syscall: 'lstat',code: 'ENOENT',path: '/home/raisinten/Desktop/universe/temp/project/~'}

What is the expected behavior?

>console.log(require('fs').realpathSync('~'));/home/raisintenundefined

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions