Skip to content

Not Following Symlink CWD #204

Closed
Closed

Description

@jvanalst

Hi,

I don't know if this is intended or not, but it's causing my issues because on Mac OS /tmp is a symbolic link to /private/tmp. On most Unix-y OSs and in AWS Lambdas it is just a regular directory.

The problem comes from mkdir.js:72, or thereabouts where the check for a directory does an fs.lstat (which treats a symlink as a file) instead of an fs.stat (which treats it as a directory).

Just wondering if there's a good reason for preferring lstat to stat? Just curious really, since it's mildly inconvenient (yes I know I should probably use os.tmpdir()).

Activity

  1. added a commit that references this issue on May 25, 2019
    ac44077
  2. stkb commented on May 25, 2019

    @stkb
    Contributor

    I've run into the same problem when using npm link with a package that downloads a binary straight into its own directory (which is a symlink because of npm link). Have created #214 to fix it.

  3. added a commit that references this issue on Oct 27, 2025
    77522f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions