Skip to content

Set YARN_CACHE_FOLDER to user profile location

This MR adds the following line to ~/.profile:

export YARN_CACHE_FOLDER=$HOME/.cache/yarn

This folder will get created automatically by Yarn if it doesn't exist, and populated when necessary. A working example can be seen in this job: https://gitlab.com/pedropombeiro/playground/-/jobs/767885240#L123

Output from a VM populated with the same configuration:

macos-shared-runner:~ gitlab-runner$ ls -al ~/.cache/yarn/v6/
total 0
drwxr-xr-x  70 gitlab-runner  staff  2240 Oct  1 13:49 .
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:44 ..
drwxr-xr-x   2 gitlab-runner  staff    64 Oct  1 13:44 .tmp
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-@textlint-ast-node-types-4.3.4-f6596c45c32c85dc06915c3077bb7686033efd32-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-@textlint-markdown-to-ast-6.0.9-e7c89e5ad15d17dcd8e5a62758358936827658fa-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-anchor-markdown-header-0.5.7-045063d76e6a1f9cd327a57a0126aa0fdec371a7-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-bail-1.0.5-b6fa133404a392cbc1f8c4bf63f5953351e7a776-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-boundary-1.0.1-4d67dc2602c0cc16dd9bce7ebf87e948290f5812-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-character-entities-1.2.4-e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-character-entities-legacy-1.1.4-94bc1845dce70a5bb9d2ecc748725661293d8fc1-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-character-reference-invalid-1.1.4-083329cda0eae272ab3dbbf37e9a382c13af1560-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-collapse-white-space-1.0.6-e63629c0016665792060dbbeb79c42239d2c5287-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-core-util-is-1.0.2-b5fd54220aa2bc5ab57aab7140c940754503c1a7-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-debug-2.6.9-5d128515df134ff327e90a4c93f4e077a536341f-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-doctoc-1.4.0-3115aa61d0a92f0abb0672036918ea904f5b9e02-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-dom-serializer-0.2.2-1afb81f533717175d478655debc5e332d9f9bb51-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-domelementtype-1.3.1-d048c44b37b0d10a7f2a3d5fee3f4333d790481f-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-domelementtype-2.0.2-f3b6e549201e46f588b59463dd77187131fe6971-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-domhandler-2.4.2-8805097e933d65e85546f726d60f5eb88b44f803-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-domutils-1.7.0-56ea341e834e06e6748af7a1cb25da67ea9f8c2a-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-emoji-regex-6.1.3-ec79a3969b02d2ecf2b72254279bf99bc7a83932-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-entities-1.1.2-bdfa735299664dfafd34529ed4f8522a275fea56-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-entities-2.0.3-5c487e5742ab93c15abb5da22759b8590ec03b7f-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-extend-3.0.2-f8b1136b4071fbd8eb140aff858b1019ec2915fa-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-fault-1.0.4-eafcfc0a6d214fc94601e170df29954a4f842f13-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-format-0.2.2-d6170107e9efdc4ed30c9dc39016df942b5cb58b-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-htmlparser2-3.9.2-1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-inherits-2.0.4-0fa2c64f932917c3433a0ded55363aae37416b7c-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-alphabetical-1.0.4-9e7d6b94916be22153745d184c298cbf986a686d-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-alphanumerical-1.0.4-7eb9a2431f855f6b1ef1a78e326df515696c4dbf-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-buffer-1.1.6-efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-decimal-1.0.4-65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-hexadecimal-1.0.4-cc35c97588da4bd49a8eedd6bc4082d44dcb23a7-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-plain-obj-1.1.0-71a50c8429dfca773c92a390a4a03b39fcd51d3e-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-whitespace-character-1.0.4-0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-is-word-character-1.0.4-ce0e73216f98599060592f62ff31354ddbeb0230-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-isarray-1.0.0-bb935d48582cba168c06834957a54a3e07124f11-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-markdown-escapes-1.0.4-c95415ef451499d7602b91095f3c8e8975f78535-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-minimist-1.2.5-67d66014b66a6a8aaa0c083c5fd58df4e4e97602-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-ms-2.0.0-5608aeadfc00be6c2901df5f9861788de0d597c8-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-parse-entities-1.2.2-c31bf0f653b6661354f8973559cb86dd1d5edf50-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-process-nextick-args-2.0.1-7820d9b16120cc55ca9ae7792680ae7dba6d7fe2-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-readable-stream-2.3.7-1eca1cf711aef814c04f62252a36a62f6cb23b57-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-remark-frontmatter-1.3.3-67ec63c89da5a84bb793ecec166e11b4eb47af10-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-remark-parse-5.0.0-4c077f9e499044d1d5c13f80d7a98cf7b9285d95-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-repeat-string-1.6.1-8dcae470e1c88abc2d600fff4a776286da75e637-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-replace-ext-1.0.0-de63128373fcbf7c3ccfa4de5a480c45a67958eb-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-safe-buffer-5.1.2-991ec69d296e0313747d59bdfd2b745c35f8828d-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-state-toggle-1.0.3-e123b16a88e143139b09c6852221bc9815917dfe-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-string-decoder-1.1.1-9cf1611ba62685d7030ae9e4ba34149c3af03fc8-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-structured-source-3.0.2-dd802425e0f53dc4a6e7aca3752901a1ccda7af5-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-traverse-0.6.6-cbdf560fd7b9af632502fed40f918c157ea97137-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-trim-0.0.1-5858547f6b290757ee95cccc666fb50084c460dd-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-trim-trailing-lines-1.1.3-7f0739881ff76657b7776e10874128004b625a94-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-trough-1.0.5-b8b639cefad7d0bb2abd37d433ff8293efa5f406-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-underscore-1.8.3-4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unherit-1.1.3-6c9b503f2b41b262330c80e91c8614abdaa69c22-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unified-6.2.0-7fbd630f719126d67d40c644b7e3f617035f6dba-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unist-util-is-3.0.0-d9e84381c2468e82629e4a5be9d7d05a2dd324cd-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unist-util-remove-position-1.1.4-ec037348b6102c897703eee6d0294ca4755a2020-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unist-util-stringify-position-1.1.2-3f37fcf351279dcbca7480ab5889bb8a832ee1c6-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unist-util-visit-1.4.1-4724aaa8486e6ee6e26d7ff3c8685960d560b1e3-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-unist-util-visit-parents-2.1.2-25e43e55312166f3348cae6743588781d112c1e9-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-update-section-0.3.3-458f17820d37820dc60e20b86d94391b00123158-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-util-deprecate-1.0.2-450d4dc9fa70de732762fbd2d4a28981419a0ccf-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-vfile-2.3.0-e62d8e72b20e83c324bc6c67278ee272488bf84a-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-vfile-location-2.0.6-8a274f39411b8719ea5728802e10d9e0dff1519e-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-vfile-message-1.1.1-5833ae078a1dfa2d96e9647886cd32993ab313e1-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-x-is-string-0.1.0-474b50865af3a49a9c4657f05acd145458f77d82-integrity
drwxr-xr-x   3 gitlab-runner  staff    96 Oct  1 13:49 npm-xtend-4.0.2-bb72779f5fa465186b1f438f674fa347fdb5db54-integrity

macos-shared-runner:~ gitlab-runner$ cat ~/.profile 
. ~/.asdf/plugins/java/set-java-home.bash
export YARN_CACHE_FOLDER="$HOME/.cache/yarn"

Closes #40 (closed)

Merge request reports