mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-19 13:08:27 +02:00
fix: add token to install
This commit is contained in:
parent
079e10bfd6
commit
89f6825456
5 changed files with 7 additions and 6 deletions
4
dist/utils/install.js
vendored
4
dist/utils/install.js
vendored
|
@ -4,7 +4,7 @@ import { addPath, info } from '@actions/core';
|
|||
import getAsset from './getAsset.js';
|
||||
import { join } from 'path';
|
||||
import { homedir } from 'os';
|
||||
export default async (release) => {
|
||||
export default async (release, token) => {
|
||||
const asset = getAsset(release.assets);
|
||||
const path = join(homedir(), '.bun', 'bin', asset.name);
|
||||
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
|
||||
|
@ -14,7 +14,7 @@ export default async (release) => {
|
|||
return;
|
||||
}
|
||||
info(`Downloading Bun from ${asset.asset.browser_download_url}.`);
|
||||
const zipPath = await downloadTool(asset.asset.browser_download_url);
|
||||
const zipPath = await downloadTool(asset.asset.browser_download_url, `token ${token}`);
|
||||
const extracted = await extractZip(zipPath, join(homedir(), '.bun', 'bin'));
|
||||
const newCache = await cacheDir(extracted, 'bun', release.version);
|
||||
await saveCache([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue