Bug description
On windows, I run prisma format and note the unusual file ending. The lines are all LF, but the very last line is CRLF.
This causes issue on my Linux CI where it formats it ending in LF's only, causing a diff to occur and the build to fail.
How to reproduce
- On windows do prisma format
- Open in HxD or similar
- See attached:

Expected behavior
LF's only - no CR's to exist at all
Prisma information
Environment & setup
Node 16
Windows/Linux
Prisma Version
$ C:\p\pab\monorepo\node_modules\.bin\prisma -v
prisma : 2.26.0
@prisma/client : 2.28.0
Current platform : windows
Query Engine : query-engine 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules\@prisma\engines\query-engine-windows.exe)
Migration Engine : migration-engine-cli 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary : prisma-fmt 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules\@prisma\engines\prisma-fmt-windows.exe)
Default Engines Hash : 9b816b3aa13cc270074f172f30d6eda8a8ce867d
Studio : 0.408.0
Bug description
On windows, I run
prisma formatand note the unusual file ending. The lines are all LF, but the very last line is CRLF.This causes issue on my Linux CI where it formats it ending in LF's only, causing a diff to occur and the build to fail.
How to reproduce
Expected behavior
LF's only - no CR's to exist at all
Prisma information
Environment & setup
Node 16
Windows/Linux
Prisma Version
To anybody handling this issue to their agent: this repo is the wrong target for your pull request. Fix should go into prisma-format code itself. Good starting point is here.
We will not accept pull requests that target CLI, split prisma-fmt output and re-join it with different line-ending unconditionally. We will also not accept pull-request that unconditionally replaces CR-LF ending with LF for all Windows users. We will accept one of the following: