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

Yarn won't change offline-cache folder if the current offline-cache folder isn't permitted to create #6068

Open
paleite opened this issue Jul 6, 2018 · 0 comments
Assignees
Labels

Comments

@paleite
Copy link

paleite commented Jul 6, 2018

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

What is the current behavior?
Yarn doesn't allow me to change the folder for yarn-offline-mirror, if it doesn't have write access to the current one.

If the current behavior is a bug, please provide the steps to reproduce.
After running yarn config set yarn-offline-mirror ../npm-packages-offline-cache (not the two dots in the path) it saves the config, but doesn't try to create the folder. After that, I tried to change the folder, but yarn throws an error saying

error An unexpected error occurred: "EACCES: permission denied, mkdir '/Users/npm-packages-offline-cache'".

i.e. it tries to create that dir, realises it can't then fails to update the config.

What is the expected behavior?
To be able to change the folder for yarn-offline-mirror, even if it doesn't have write access to the current one.

I expect 2 parts:

  1. When setting the folder for yarn-offline-mirror, try to create the folder.
    • If it fails, don't write to the config and throw error.
  2. When trying to change offline-mirror config, first allow the config to be changed, then try to create the folder.

Please mention your node.js, yarn and operating system version.
node v10.6.0
yarn 1.7.0
osx 10.13.4

@ghost ghost assigned arcanis Jul 6, 2018
@ghost ghost added the triaged label Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants