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

Turbo uses cache despite globalEnv being different #10690

@dstoyanoff

Description

@dstoyanoff

Verify canary release

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

Link to code that reproduces this issue

don't have a link

Which canary version will you have in your reproduction?

.

Environment information

CLI:
   Version: 2.4.4
   Path to executable: /Users/***/dev/***/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: berry

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

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

Expected behavior

The cache should not be reused between different operating systems

Actual behavior

Turbo uses macos cache on ci (ubuntu)

To Reproduce

{
  "globalEnv": ["OSTYPE"],
  "envMode": "loose"
}

Additional context

I have a turbo repo setup that needs to execute some platform-specific tasks, so I've put the OSTYPE environment variable in globalEnv in turbo.json.

Locally, OSTYPE evaluates to darwin24.0 and in CI it evaluates to linux-gnu. Yet, a task on CI actually restored a cache that has some darwin binaries, which in turn failed the deployment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions