Skip to content

Commit a56d16e

Browse files
committed
Refine errors text
1 parent 12dfa2b commit a56d16e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dist/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
164164
if (found) {
165165
version = found
166166
} else {
167-
throw new Error(`Unknown version ${parsedVersion} for ${engine} on ${platform}.
168-
Available versions for ${engine} on ${platform}: ${engineVersions.join(', ')}.
167+
throw new Error(`Unknown version ${parsedVersion} for ${engine} on ${platform}
168+
Available versions for ${engine} on ${platform}: ${engineVersions.join(', ')}
169169
Make sure you use the latest version of the action with - uses: ruby/setup-ruby@v1`)
170170
}
171171
}

ruby-builder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
7272
try {
7373
return await tc.downloadTool(url)
7474
} catch (error) {
75-
if (error.message.endsWith('404')) {
76-
throw new Error(`Unavailable version ${version} for ${engine} on ${platform}.
77-
You can request it at https://github.com/ruby/setup-ruby/issues.
75+
if (error.message.includes('404')) {
76+
throw new Error(`Unavailable version ${version} for ${engine} on ${platform}
77+
You can request it at https://github.com/ruby/setup-ruby/issues
7878
Original Error: (${error.message})`)
7979
} else {
8080
throw error

0 commit comments

Comments
 (0)