mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
Handle .tool-versions' line break on Windows (#357)
* Test .tool-version on top of Windows * Parse .tool-version with Windows-style line endings
This commit is contained in:
committed by
GitHub
parent
6389fe58dc
commit
1fe9179886
+1
-1
@@ -805,7 +805,7 @@ function parseVersionFile(versionFilePath0) {
|
||||
// For the time being we parse .tool-versions
|
||||
// If we ever start parsing something else, this should
|
||||
// become default in a new option named e.g. version-file-type
|
||||
versions.split('\n').forEach((line) => {
|
||||
versions.split(/\r?\n/).forEach((line) => {
|
||||
const appVersion = line.match(/^([^ ]+)[ ]+(ref:v?)?([^ #]+)/)
|
||||
if (appVersion) {
|
||||
const app = appVersion[1]
|
||||
|
||||
Reference in New Issue
Block a user