tkawachi / sbt-lock

Gemfile.lock for sbt
75 stars 12 forks source link

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

Open nerdydrew opened 3 years ago

nerdydrew commented 3 years ago

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.