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

Manually set cache directory #6

Open
dalin- opened this issue May 21, 2020 · 1 comment
Open

Manually set cache directory #6

dalin- opened this issue May 21, 2020 · 1 comment

Comments

@dalin-
Copy link

dalin- commented May 21, 2020

I'm getting errors like

Cannot create cache directory /.composer/cache/repo/https---packages.drupal.org-8/, or directory is not writable. Proceeding without cache

Looks like the cache directory can be manually set to a place that's actually writable
https://getcomposer.org/doc/03-cli.md#composer-cache-dir

@cjboranp
Copy link

cjboranp commented Nov 1, 2023

Here is an example below. If you put this in your project's composer.json it will set the cache directory (cache-dir) to where you want:

"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "cache-dir": "./.cache",
    "platform": {
        "php": "8.1.0"
    }
}

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

2 participants