chore: build

This commit is contained in:
xHyroM 2022-07-12 09:11:55 +02:00
parent 2af2463ea8
commit 32f942a87d

View File

@ -4,12 +4,15 @@ import { addPath, info } from '@actions/core';
import getAsset from './getAsset.js';
import getHomeDir from './getHomeDir.js';
import { join } from 'path';
import { readdirSync } from 'fs';
export default async (release) => {
const asset = getAsset(release.assets);
const path = join(getHomeDir(), '.bun', 'bin');
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}`);
if (cache) {
info(`Using cached Bun installation from ${cache}.`);
console.log(path);
console.log(readdirSync(path));
addPath(path);
return;
}