Skip to content

Commit 25df23a

Browse files
Parse .tool-version with Windows-style line endings
1 parent 91c62ff commit 25df23a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26680,7 +26680,7 @@ function parseVersionFile(versionFilePath0) {
2668026680
// For the time being we parse .tool-versions
2668126681
// If we ever start parsing something else, this should
2668226682
// become default in a new option named e.g. version-file-type
26683-
versions.split('\n').forEach((line) => {
26683+
versions.split(/\r?\n/).forEach((line) => {
2668426684
const appVersion = line.match(/^([^ ]+)[ ]+(ref:v?)?([^ #]+)/)
2668526685
if (appVersion) {
2668626686
const app = appVersion[1]

src/setup-beam.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ function parseVersionFile(versionFilePath0) {
805805
// For the time being we parse .tool-versions
806806
// If we ever start parsing something else, this should
807807
// become default in a new option named e.g. version-file-type
808-
versions.split('\n').forEach((line) => {
808+
versions.split(/\r?\n/).forEach((line) => {
809809
const appVersion = line.match(/^([^ ]+)[ ]+(ref:v?)?([^ #]+)/)
810810
if (appVersion) {
811811
const app = appVersion[1]

0 commit comments

Comments
 (0)