website icon indicating copy to clipboard operation
website copied to clipboard

Appveyor yarn caching assumes Windows image

Open jacobq opened this issue 7 years ago • 5 comments

I'm not sure where I should file this issue, but AppVeyor now supports Linux VMs (and supposedly plans to support macOS soon), yet this page (https://yarnpkg.com/lang/en/docs/install-ci/) shows only the %LOCALAPPDATA% approach, which will only work on Windows VMs. Looks like yarn cache dir shows the corresponding dir on their Linux VMs to be: /home/appveyor/.cache/yarn/v1 so the following snippet could be added to appveyor.yml:

for:
-
  matrix:
    except:
      - image: Ubuntu
  cache:
    - "%LOCALAPPDATA%\\Yarn"

-
  matrix:
    only:
      - image: Ubuntu
  cache:
    - "~/.cache/yarn"

jacobq avatar May 30 '18 20:05 jacobq

Do you want to do a PR correcting that?

Haroenv avatar May 31 '18 07:05 Haroenv

I can, if needed, but I was hoping someone else would review this and do the PR. It might be worth adding a couple comments showing a simple "Windows only" case and then this "hybrid" case.

jacobq avatar May 31 '18 13:05 jacobq

@Daniel15, did you use appVeyor on Linux already?

Haroenv avatar May 31 '18 14:05 Haroenv

BTW, docs related to this are here and here.

jacobq avatar May 31 '18 15:05 jacobq

Seems correct then, will accept a pr

Haroenv avatar Jun 01 '18 05:06 Haroenv