mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Use an explicit list of supported platforms for nicer error messages
This commit is contained in:
@@ -13,6 +13,10 @@ const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
|
||||
const windows = common.windows
|
||||
|
||||
export function getAvailableVersions(platform, engine) {
|
||||
if (!common.supportedPlatforms.includes(platform)) {
|
||||
throw new Error(`Unsupported platform ${platform}`)
|
||||
}
|
||||
|
||||
return rubyBuilderVersions[engine]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user