mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-19 04:58:25 +02:00
chore: build
This commit is contained in:
parent
ad6ee5950c
commit
b15fb7d098
4 changed files with 12 additions and 17 deletions
5
dist/utils/install.js
vendored
5
dist/utils/install.js
vendored
|
@ -4,7 +4,8 @@ import getAsset from './getAsset.js';
|
|||
import getHomeDir from './getHomeDir.js';
|
||||
import { join } from 'path';
|
||||
export default async (release) => {
|
||||
const cache = find('bun', release.tag_name);
|
||||
const cache = find('bun', release.version);
|
||||
console.log(cache);
|
||||
if (cache) {
|
||||
info(`Using cached Bun installation from ${cache}.`);
|
||||
addPath(cache);
|
||||
|
@ -14,7 +15,7 @@ export default async (release) => {
|
|||
info(`Downloading Bun from ${asset.asset.browser_download_url}.`);
|
||||
const zipPath = await downloadTool(asset.asset.browser_download_url);
|
||||
const extracted = await extractZip(zipPath, join(getHomeDir(), '.bun', 'bin'));
|
||||
const newCache = await cacheDir(extracted, 'bun', release.tag_name);
|
||||
const newCache = await cacheDir(extracted, 'bun', release.version);
|
||||
info(`Cached Bun to ${newCache}.`);
|
||||
addPath(newCache);
|
||||
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name.replace('.zip', ''));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue