mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 12:38:24 +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
|
@ -6,7 +6,7 @@ import getAsset from './getAsset.js';
|
|||
import { join } from 'path';
|
||||
import { homedir } from 'os';
|
||||
|
||||
export default async(release: Release) => {
|
||||
export default async(release: Release, token: string) => {
|
||||
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}`);
|
||||
|
@ -18,7 +18,7 @@ export default async(release: Release) => {
|
|||
|
||||
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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue