fix: dont error when invalid asset for miscTestBuilds

This commit is contained in:
xHyroM 2022-07-12 19:53:24 +02:00
parent 4e76ddea17
commit 633e7abe1e
6 changed files with 26 additions and 10 deletions

View file

@ -6,8 +6,8 @@ import getAsset from './getAsset.js';
import { join } from 'path';
import { homedir } from 'os';
export default async(release: Release) => {
const asset = getAsset(release.assets);
export default async(release: Release, miscTestBuilds: boolean) => {
const asset = getAsset(release.assets, miscTestBuilds);
const path = join(homedir(), '.bun', 'bin', asset.name);
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
if (cache) {