Skip to content

Commit 4133e1f

Browse files
authored
Apply suggestions from code review
1 parent 674a514 commit 4133e1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ function parseRubyEngineAndVersion(rubyVersion) {
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()
137-
const rubyLine = toolVersions.split(/\r?\n/).filter(e => /^ruby\s=\s/.test(e))[0]
138-
rubyVersion = rubyLine.match(/^ruby\s=\s['"](.+)['"]$/)[1]
137+
const rubyLine = toolVersions.split(/\r?\n/).filter(e => /^ruby\s*=\s*/.test(e))[0]
138+
rubyVersion = rubyLine.match(/^ruby\s*=\s*['"](.+)['"]$/)[1]
139139
console.log(`Using ${rubyVersion} as input from file mise.toml`)
140140
}
141141

0 commit comments

Comments
 (0)