Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function parseRubyEngineAndVersion(rubyVersion) {
} else if (rubyVersion === '.tool-versions') { // Read from .tool-versions
const toolVersions = fs.readFileSync('.tool-versions', 'utf8').trim()
const rubyLine = toolVersions.split(/\r?\n/).filter(e => /^ruby\s/.test(e))[0]
rubyVersion = rubyLine.split(/\s/)[1]
rubyVersion = rubyLine.split(/\s+/)[1]
Copy link
Member

@eregon eregon Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes me think we should really do https://github.com/ruby/setup-ruby/pull/717/files#r1982040471 but I merged this as-is to fix it ASAP.
We should also add a test for .tool-versions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log(`Using ${rubyVersion} as input from file .tool-versions`)
} else if (rubyVersion === 'mise.toml') { // Read from mise.toml
const toolVersions = fs.readFileSync('mise.toml', 'utf8').trim()
Expand Down