这是indexloc提供的服务,不要输入任何密码
Skip to content

error hashing files when globalDependencies contains a symlinked directory #531

@markjm

Description

@markjm

What version of Turborepo are you using?

1.0.24

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Linux

Describe the Bug

If a symlinked directory exists in the in a globalDependencies matching path, turborepo will throw with error hashing files. make sure that git has been initialized git hash-object exited with status: exit status 128.

This is because we collect all the file names to pass to git hash-object by grabbing all via GlobFiles->Walk->WalkMode. In the case of a symlinked directory, info.isDir()=false, causing a directory path to be passed to git hash-object (which is dissallowed)

Expected Behavior

Symlinked directories also be excluded. Fortunately, godirwalk already supported this via IsDirOrSymlinkToDir

To Reproduce

  1. in kitchen-sink example, add turbo config:
    "globalDependencies": [
      "node_modules/**"
    ],

(just as an example)

  1. Run yarn build
  2. Build command will error

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