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
fix(core): always use environment variable for cache directory #6746
fix(core): always use environment variable for cache directory #6746
Conversation
In 6c16ee0 the environment variable was used while reading from `nx.json`. But in `packages/workspace/src/tasks-runner/cache.ts` the `cacheDirectory` is used without using `readCacheDirectoryProperty`. Now we check the environment variable in `cacheDirectory`, so that the environment variable is always used. ISSUES CLOSED: nrwl#6629
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/BEBHt4hHGTNDjrzh51gqBsq6qwNb |
Nx Cloud ReportCI ran the following commands for commit ec9cd44. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch Sent with 💌 from NxCloud. |
Nx Cloud ReportWe didn't find any information for the current pull request with the commit ec9cd44. Check the Nx Cloud Github Integration documentation for more information. Sent with 💌 from NxCloud. |
@FrozenPandaz Any idea why the build failed? I couldn't find any error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this! LGTM 🎉
…6746) In 6c16ee0 the environment variable was used while reading from `nx.json`. But in `packages/workspace/src/tasks-runner/cache.ts` the `cacheDirectory` is used without using `readCacheDirectoryProperty`. Now we check the environment variable in `cacheDirectory`, so that the environment variable is always used. ISSUES CLOSED: nrwl#6629
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
In 6c16ee0 the environment variable was used
while reading from
nx.json
. But inpackages/workspace/src/tasks-runner/cache.ts
the
cacheDirectory
is used without usingreadCacheDirectoryProperty
. Now wecheck the environment variable in
cacheDirectory
, so that the environmentvariable is always used.
ISSUES CLOSED: #6629
Current Behavior
The cache directory can only be set using
nx.json
.Expected Behavior
The cache directory set in
nx.json
can be overwritten using environment variableNX_CACHE_DIRECTORY
.Related Issue(s)
Fixes #6629