Skip to content
This repository was archived by the owner on May 22, 2022. It is now read-only.

Fix bug where Windows line endings affect the dependency hash#39

Open
nerdydrew wants to merge 1 commit intotkawachi:masterfrom
nerdydrew:eol
Open

Fix bug where Windows line endings affect the dependency hash#39
nerdydrew wants to merge 1 commit intotkawachi:masterfrom
nerdydrew:eol

Conversation

@nerdydrew
Copy link
Copy Markdown

This fixes a bug where the dependency hash changes if the lock file gets converted to Windows line endings (CRLF) for whatever reason, such as if Git's autocrlf setting is enabled on Windows. If this happens, readDepsHash would return the hash with a \r on the end, making it different from before. Trimming whitespace fixes the issue.

Even though lock files are written out with Unix line endings, some
systems may convert them to Windows line endings (e.g. Git's autocrlf
setting). Trimming ensures that the dependency hash remains the same,
regardless of operating system or line endings.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant