Skip to content
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

[Bug?]: YARN_CACHE_FOLDER ignored. #6302

Open
james-lawrence opened this issue May 21, 2024 · 1 comment
Open

[Bug?]: YARN_CACHE_FOLDER ignored. #6302

james-lawrence opened this issue May 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@james-lawrence
Copy link

james-lawrence commented May 21, 2024

Describe the bug

setting YARN_CACHE_FOLDER does nothing for yarn install or yarn config --no-defaults given the documentation I expected it to work.

To reproduce

$ yarn --version
4.1.1
$ YARN_CACHE_FOLDER=".example" yarn config --no-defaults
├─ cacheFolder
│  ├─ Description: Folder where the cache files must be written
│  ├─ Source: <internal>
│  └─ Value: '/home/.yarn/berry/cache'
│
├─ enableTelemetry
│  ├─ Description: If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry
│  ├─ Source: /home/.yarnrc.yml
│  └─ Value: false
│
└─ nodeLinker
   ├─ Description: The linker used for installing Node packages, one of: "pnp", "pnpm", or "node-modules"
   ├─ Source: /home/development/egciorg/egmeta/console/.yarnrc.yml
   └─ Value: 'node-modules'

Environment

System:
    OS: Linux 6.9 Arch Linux
    CPU: (16) x64 AMD Ryzen 7 1800X Eight-Core Processor
    Memory: 20.80 GB / 31.27 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Managers:
    Cargo: 1.70.0 - /usr/bin/cargo
    Gradle: 8.7 - /usr/bin/gradle
    pip3: 24.0 - /usr/bin/pip3
    RubyGems: 3.3.25 - /usr/bin/gem
  Utilities:
    Bazel: 7.1.1 - /usr/bin/bazel
    CMake: 3.29.3 - /usr/bin/cmake
    Make: 4.4.1 - /usr/bin/make
    GCC: 14.1.1 - /usr/bin/gcc
    Git: 2.45.1 - /usr/bin/git
    Clang: 17.0.6 - /usr/bin/clang
    Ninja: 1.12.1 - /usr/bin/ninja
    FFmpeg: 6.1.1 - /usr/bin/ffmpeg
    Curl: 8.7.1 - /usr/bin/curl
    OpenSSL: 3.3.0 - /usr/bin/openssl
  Servers:
    Apache: 2.4.59 - /usr/bin/apachectl
  Virtualization:
    Docker: 5.0.3 - /home/.local/bin/docker
  SDKs:
    Android SDK:
      API Levels: 29, 30, 33
      Build Tools: 29.0.3, 30.0.3, 32.0.0, 33.0.0, 33.0.2
  IDEs:
    Nano: 8.0 - /usr/bin/nano
    VSCode: 1.89.0 - /usr/bin/code
    Vim: 9.1 - /usr/bin/vim
  Languages:
    Bash: 5.2.26 - /usr/bin/bash
    Go: 1.22.3 - /usr/bin/go
    Java: 1.8.0_412 - /usr/bin/javac
    Perl: 5.38.2 - /usr/bin/perl
    Protoc: 25.3 - /usr/bin/protoc
    Python: 3.12.3 - /usr/bin/python
    Python3: 3.12.3 - /usr/bin/python3
    Ruby: 3.0.6 - /usr/bin/ruby
    Rust: 1.70.0 - /usr/bin/rustc
  Databases:
    PostgreSQL: 16.2 - /usr/bin/postgres
    SQLite: 3.45.3 - /usr/bin/sqlite3
  Browsers:
    Chromium: 125.0.6422.60

Additional context

No response

@james-lawrence james-lawrence added the bug Something isn't working label May 21, 2024
@yeongrokgim
Copy link

yeongrokgim commented Jul 12, 2024

This might not be a bug (rather insufficient documentation, if it counts), by setting YARN_ENABLE_GLOBAL_CACHE=false

i.e.

$ pwd
/workspaces/myapp

$ yarn --version
4.3.1

$ YARN_CACHE_FOLDER=.example YARN_ENABLE_GLOBAL_CACHE=false yarn config --no-defaults
├─ cacheFolder
│  ├─ Description: Folder where the cache files must be written
│  ├─ Source: <environment>
│  └─ Value: '/workspaces/myapp/.example'
│
└─ enableGlobalCache
   ├─ Description: If true, the system-wide cache folder will be used regardless of `cache-folder`
   ├─ Source: <environment>
   └─ Value: false

See also - #1282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants