Skip to content

Commit 28233a0

Browse files
Karibasheregon
authored andcommitted
bugfix: Fix bug that version cannot be parsed in .tool-versions
1 parent 277ba2a commit 28233a0

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
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function parseRubyEngineAndVersion(rubyVersion) {
130130
} else if (rubyVersion === '.tool-versions') { // Read from .tool-versions
131131
const toolVersions = fs.readFileSync('.tool-versions', 'utf8').trim()
132132
const rubyLine = toolVersions.split(/\r?\n/).filter(e => /^ruby\s/.test(e))[0]
133-
rubyVersion = rubyLine.split(/\s/)[1]
133+
rubyVersion = rubyLine.split(/\s+/)[1]
134134
console.log(`Using ${rubyVersion} as input from file .tool-versions`)
135135
} else if (rubyVersion === 'mise.toml') { // Read from mise.toml
136136
const toolVersions = fs.readFileSync('mise.toml', 'utf8').trim()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy