Provide a way to disable env conflicts warning
See original GitHub issueProblem
In some settings, it might be necessary to disable .env conflict warning.
For example, a monorepo could have a .env file at the root and also symlink it inside a monorepo package. In this case, disabling .env conflict warnings is completely reasonable.
For example, running Nest.JS tests with jest will print this warning for each test file (as jest runs each test file in a separate worker) which is very noisy:

Suggested solution
Provide a way to disable env warnings.
Alternatives
No user-space workaround is possible as the check is hardcoded in the generated code: https://github.com/prisma/prisma/blob/698ce54d3d5e6d4635263d5709bfcc7d32a146a5/packages/client/src/generation/TSClient/TSClient.ts#L140-L148
Additional context
prisma@3.2.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How do I disable a Pylint warning? - python - Stack Overflow
pylint --generate-rcfile shows it like this: [MESSAGES CONTROL] # Enable the message, report, category or checker with the given id(s).
Read more >Resolving Conflicts - ServiceNow Developers
When a file is locked for editing to avoid conflicts, a developer can: View differences: Click the View differences link in the warning...
Read more >Found conflicts between different versions of 'assembly' that ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >How to Resolve GitHub Merge Conflicts | Cloudbees Blog
2. Conflicts From Pulling Remote Changes to a Local Repository · Now you have basically two choices to resolve your conflict: · Essentially,...
Read more >Merge conflicts - GitLab Docs
Methods of resolving conflicts · Interactive mode: UI method best for conflicts that only require you to select which version of a line...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

any news on this?, when doing testing, watching this warning repeated a million times gives too much noise, when in practice there is literally no actual env conflict because every .env is symlinked
I suggest people look at https://www.npmjs.com/package/patch-package for a workaround.
From: Andy Young @.> Sent: Wednesday, October 5, 2022 1:51:42 PM To: prisma/prisma @.> Cc: Ivan Tanev @.>; Author @.> Subject: Re: [prisma/prisma] Provide a way to disable env conflicts warning (#9726)
Hacky workaround to suppress this error within automated tests if you’re using Jest - by mocking out the warning function(!)
(Likely translatable to other testing libraries if you’re not using Jest.)
prisma_mock.ts:
import prismaClient from @./client"; @./client/runtime/index.js", () => { const defaultMethods = jest.requireActual( @.***/client/runtime/index.js" );
return { __esModule: true, …defaultMethods,
potential better solution warnEnvConflicts: () => undefined, };}); export default prismaClient;
— Reply to this email directly, view it on GitHub https://github.com/prisma/prisma/issues/9726#issuecomment-1268269747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABROHZEMFV3RN2TP7LMSRLWBVMT5ANCNFSM5F2HXXEQ . You are receiving this because you authored the thread.Message ID: @.***>