mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
fix: use asset.name
This commit is contained in:
parent
32f942a87d
commit
36bc669fea
4 changed files with 6 additions and 6 deletions
4
dist/utils/install.js
vendored
4
dist/utils/install.js
vendored
|
@ -7,7 +7,7 @@ import { join } from 'path';
|
|||
import { readdirSync } from 'fs';
|
||||
export default async (release) => {
|
||||
const asset = getAsset(release.assets);
|
||||
const path = join(getHomeDir(), '.bun', 'bin');
|
||||
const path = join(getHomeDir(), '.bun', 'bin', asset.name);
|
||||
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}`);
|
||||
if (cache) {
|
||||
info(`Using cached Bun installation from ${cache}.`);
|
||||
|
@ -23,6 +23,6 @@ export default async (release) => {
|
|||
await saveCache([extracted], `bun-${process.platform}-${asset.name}`);
|
||||
info(`Cached Bun to ${newCache}.`);
|
||||
addPath(newCache);
|
||||
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name.replace('.zip', ''));
|
||||
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name);
|
||||
addPath(bunPath);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue