mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 10:40:10 +08:00
chore: build
This commit is contained in:
parent
2af2463ea8
commit
32f942a87d
3
dist/utils/install.js
vendored
3
dist/utils/install.js
vendored
@ -4,12 +4,15 @@ import { addPath, info } from '@actions/core';
|
|||||||
import getAsset from './getAsset.js';
|
import getAsset from './getAsset.js';
|
||||||
import getHomeDir from './getHomeDir.js';
|
import getHomeDir from './getHomeDir.js';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
import { readdirSync } from 'fs';
|
||||||
export default async (release) => {
|
export default async (release) => {
|
||||||
const asset = getAsset(release.assets);
|
const asset = getAsset(release.assets);
|
||||||
const path = join(getHomeDir(), '.bun', 'bin');
|
const path = join(getHomeDir(), '.bun', 'bin');
|
||||||
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}`);
|
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}`);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
info(`Using cached Bun installation from ${cache}.`);
|
info(`Using cached Bun installation from ${cache}.`);
|
||||||
|
console.log(path);
|
||||||
|
console.log(readdirSync(path));
|
||||||
addPath(path);
|
addPath(path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user