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

--cache-folder flag is being ignored #3074

Closed
kevcenteno opened this issue Apr 7, 2017 · 4 comments
Closed

--cache-folder flag is being ignored #3074

kevcenteno opened this issue Apr 7, 2017 · 4 comments

Comments

@kevcenteno
Copy link

Do you want to request a feature or report a bug?

bug

What is the current behavior?
Yarn doesn't use the --cache-folder path; It always installs to whatever yarn config set cache-folder is set to.

If the current behavior is a bug, please provide the steps to reproduce.

  1. yarn config set cache-folder ~/.cache/yarn-set-cache-folder
  2. yarn install --cache-folder ~/.cache/yarn-flag-cache-folder

What is the expected behavior?

  1. ~/.cache/yarn-flag-cache-folder has the cached modules
  2. --cache-folder path should override the yarn config set cache-folder path

Please mention your node.js, yarn and operating system version.
node.js: 4.4.7
yarn: 0.22.0
OS: Ubuntu 14.04.5

@felixfbecker
Copy link

Can confirm:

18:28 $ yarn --verbose --cache-folder /Users/felix/test/yarntestcache/
yarn install v0.22.0
verbose 0.185 current time: 2017-04-07T16:28:51.554Z
verbose 0.263 Performing "GET" request to "https://yarnpkg.com/latest-version".
warning No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
verbose 0.453 Creating directory "/Users/felix/test/node_modules/is-thirteen".
verbose 0.453 Creating directory "/Users/felix/test/node_modules/noop3".
verbose 0.456 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/.npmignore" to "/Users/felix/test/node_modules/is-thirteen/.npmignore".
verbose 0.457 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/README.md" to "/Users/felix/test/node_modules/is-thirteen/README.md".
verbose 0.457 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/code_of_conduct.md" to "/Users/felix/test/node_modules/is-thirteen/code_of_conduct.md".
verbose 0.457 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/index.js" to "/Users/felix/test/node_modules/is-thirteen/index.js".
verbose 0.462 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/package.json" to "/Users/felix/test/node_modules/is-thirteen/package.json".
verbose 0.462 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/test.js" to "/Users/felix/test/node_modules/is-thirteen/test.js".
verbose 0.462 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/index.js" to "/Users/felix/test/node_modules/noop3/index.js".
verbose 0.462 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/factory.js" to "/Users/felix/test/node_modules/noop3/factory.js".
verbose 0.463 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/license" to "/Users/felix/test/node_modules/noop3/license".
verbose 0.463 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/package.json" to "/Users/felix/test/node_modules/noop3/package.json".
verbose 0.463 Copying "/Users/felix/Library/Caches/Yarn/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/readme.md" to "/Users/felix/test/node_modules/noop3/readme.md".
[4/4] 📃  Building fresh packages...
✨  Done in 0.32s.

Notice the verbose logs Copying from the default cache.

@bestander this breaks the workaround for disabling the cache (yarnpkg/rfcs#53)

@felixfbecker
Copy link

Seems to be fixed in 0.23.1:

19:22 $ yarn --verbose --cache-folder /Users/felix/test/yarntestcache/
yarn install v0.23.1
verbose 0.167 current time: 2017-04-07T17:22:34.772Z
verbose 0.243 Performing "GET" request to "https://yarnpkg.com/latest-version".
warning No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
verbose 0.385 Creating directory "/Users/felix/test/node_modules/noop3".
verbose 0.386 Creating directory "/Users/felix/test/node_modules/is-thirteen".
verbose 0.389 Copying "/Users/felix/test/yarntestcache/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/index.js" to "/Users/felix/test/node_modules/noop3/index.js".
verbose 0.389 Copying "/Users/felix/test/yarntestcache/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/factory.js" to "/Users/felix/test/node_modules/noop3/factory.js".
verbose 0.389 Copying "/Users/felix/test/yarntestcache/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/license" to "/Users/felix/test/node_modules/noop3/license".
verbose 0.389 Copying "/Users/felix/test/yarntestcache/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/package.json" to "/Users/felix/test/node_modules/noop3/package.json".
verbose 0.394 Copying "/Users/felix/test/yarntestcache/v1/npm-noop3-13.8.1-0ae6414b6d7de3b6d85055cd2a920c1a0d61ad6e/readme.md" to "/Users/felix/test/node_modules/noop3/readme.md".
verbose 0.394 Copying "/Users/felix/test/yarntestcache/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/.npmignore" to "/Users/felix/test/node_modules/is-thirteen/.npmignore".
verbose 0.394 Copying "/Users/felix/test/yarntestcache/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/README.md" to "/Users/felix/test/node_modules/is-thirteen/README.md".
verbose 0.394 Copying "/Users/felix/test/yarntestcache/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/code_of_conduct.md" to "/Users/felix/test/node_modules/is-thirteen/code_of_conduct.md".
verbose 0.395 Copying "/Users/felix/test/yarntestcache/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/index.js" to "/Users/felix/test/node_modules/is-thirteen/index.js".
verbose 0.395 Copying "/Users/felix/test/yarntestcache/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/package.json" to "/Users/felix/test/node_modules/is-thirteen/package.json".
verbose 0.395 Copying "/Users/felix/test/yarntestcache/v1/npm-is-thirteen-2.0.0-a2dbd0f5ab7e10a4d0186e9a0b24263224d3f9b1/test.js" to "/Users/felix/test/node_modules/is-thirteen/test.js".
[4/4] 📃  Building fresh packages...
✨  Done in 0.26s.

@bestander
Copy link
Member

Good to close then?

@TimvdLippe
Copy link
Contributor

Yes this has been fixed by @arcanis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants