DavidVujic / poetry-multiproject-plugin

A Poetry plugin that makes it simple to share code between projects in monorepos.
https://davidvujic.github.io/python-polylith-docs/installation/
MIT License
190 stars 7 forks source link

fix: Poetry 1.5 TOML parsing issues in windows #31

Closed DavidVujic closed 1 year ago

DavidVujic commented 1 year ago

Description

A problem occurs when writing TOML files with Windows newlines (CRLF) and later opening the file in Poetry 1.5 (using a different TOML parser).

This PR solves this, by leaving carriage reruns unchanged. Also adding explicit "utf-8" encoding when opening files.

Motivation and Context

Fixes #30

How Has This Been Tested?

Local install on Mac OS X. Local install on Windows 10 (reproducing the error, and verifying the solution works).

Types of changes

Checklist: