Prune respecting .gitignore ignoring .env.production #9791
-
SummaryWhen using Turborepo to build a Next.js app, the default .gitignore file for a Next.js project includes the following:
Note the .env* line. When upgrading from [email protected] to [email protected], the following PR was merged: PR #9711. This change silently caused an issue in our CI. Previously, we were generating .env.production before building the Docker image. However, the new version of Turborepo unexpectedly pruned the .env.production file, breaking our CI pipeline. I am opening this discussion as a reference for others experiencing the same problem. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I see why people would want this, but it also broke my CI. What made me not believe my eyes is that this was introduced in a PATCH release, not even a MINOR... #9711 should at least have been in a MINOR version, or be OPT-IN. |
Beta Was this translation helpful? Give feedback.
We did fix a bug that it looks like was being depended on by both of you. The opt-out is here: https://turbo.build/repo/docs/reference/prune#--use-gitignorebool