mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Add token input and pass it to release assets download.
This commit is contained in:
committed by
Benoit Daloze
parent
be19563477
commit
7f50f6e3b3
+2
-1
@@ -74,8 +74,9 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
|
||||
const downloadPath = await common.measure('Downloading Ruby', async () => {
|
||||
const url = getDownloadURL(platform, engine, version)
|
||||
console.log(url)
|
||||
const auth = common.inputs.token ? `token ${common.inputs.token}` : undefined
|
||||
try {
|
||||
return await tc.downloadTool(url)
|
||||
return await tc.downloadTool(url, undefined, auth)
|
||||
} catch (error) {
|
||||
if (error.message.includes('404')) {
|
||||
throw new Error(`Unavailable version ${version} for ${engine} on ${platform}
|
||||
|
||||
Reference in New Issue
Block a user