mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 12:38:24 +02:00
chore: build
This commit is contained in:
parent
fe4b2b1cd6
commit
a99ac77932
2 changed files with 4 additions and 7 deletions
|
@ -5,7 +5,6 @@ import { addPath, info } from '@actions/core';
|
|||
import getAsset from './getAsset.js';
|
||||
import { join } from 'path';
|
||||
import { homedir } from 'os';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
export default async(release: Release, token: string) => {
|
||||
const asset = getAsset(release.assets);
|
||||
|
@ -22,10 +21,9 @@ export default async(release: Release, token: string) => {
|
|||
const zipPath = await downloadTool(
|
||||
asset.asset.browser_download_url,
|
||||
null,
|
||||
`token ${token}`,
|
||||
new URL(asset.asset.browser_download_url).host.includes('github.com') ? `token ${token}` : '',
|
||||
{
|
||||
'Authorization': `token ${token}`,
|
||||
accept: 'application/octet-stream'
|
||||
'Authorization': new URL(asset.asset.browser_download_url).host.includes('github.com') ? `token ${token}` : ''
|
||||
}
|
||||
);
|
||||
const extracted = await extractZip(zipPath, join(homedir(), '.bun', 'bin'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue