Skip to content

Repositories without version control cannot reference files in parent directories in their inputs #10485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
TAGraves opened this issue May 16, 2025 · 0 comments
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@TAGraves
Copy link

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/TAGraves/turborepo-gitdir-inputs-example

Which canary version will you have in your reproduction?

[email protected]

Environment information

CLI:
   Version: 2.5.4-canary.0
   Path to executable: /Users/tommygraves/code/turbo-git-example/my-turborepo/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Not running
   Package manager: npm

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 9210
   Available CPU cores: 14

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): WarpTerminal
   Terminal program version (TERM_PROGRAM_VERSION): v0.2025.04.16.08.11.stable_02
   Shell (SHELL): /bin/bash
   stdin: false

Expected behavior

rm -rf .git && npx turbo build --summarize should show the inputs as

      "inputs": {
        "../../file": "13e99c908ad67efe7c57c47115bdc03323d9c6e4",
        "package.json": "10e1df4c3b8be9779e631d588ff62068e66c1cc3",
        "turbo.json": "d748bd5ee86a3ea5588fafd478c5b496f3f2e576"
      },

Actual behavior

rm -rf .git && npx turbo build --summarize shows the inputs as (note ../../file is missing):

      "inputs": {
        "package.json": "10e1df4c3b8be9779e631d588ff62068e66c1cc3",
        "turbo.json": "d748bd5ee86a3ea5588fafd478c5b496f3f2e576"
      },

To Reproduce

git clone [email protected]:TAGraves/turborepo-gitdir-inputs-example.git
cd turborepo-gitdir-inputs-example
npm install
npx turbo build --summarize

Observe the result, which should look like: with-git-dir.json

Then:

rm -rf .git
npx turbo build --summarize

Observe the result, which should look like: without-git-dir.json

Additional context

This is probably related to #9574 but it seemed different enough to warrant its own issue since this one does not involve any globbing, but merely directory traversal. I also verified that this isn't just an issue with the --summarize output; I can change the contents of file and Turbo will still have a cache hit.

@TAGraves TAGraves added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

1 participant