From 28233a011b6bb8633ea908d76c6d23aab6518b5c Mon Sep 17 00:00:00 2001 From: Karibash Date: Tue, 11 Mar 2025 09:07:41 +0900 Subject: [PATCH] bugfix: Fix bug that version cannot be parsed in .tool-versions --- dist/index.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index d87486b6d..cae2289f2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74933,7 +74933,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] 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() diff --git a/index.js b/index.js index 683f713f9..7ea9672b0 100644 --- a/index.js +++ b/index.js @@ -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] 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() 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