Skip to content

prisma format ends the file with a single CRLF on windows #8548

@binary64

Description

@binary64

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

  1. On windows do prisma format
  2. Open in HxD or similar
  3. See attached:

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/2-confirmedBug has been reproduced and confirmed.good first issueAlways wanted to get involved in an open source project but don’t know where to begin? Welcome!kind/bugA reported bug.tech/typescriptIssue for tech TypeScript.topic: prisma formatCLI: prisma formattopic: windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions