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

@@ -4,8 +4,8 @@ import { addPath, info } from '@actions/core';
import getAsset from './getAsset.js';
import { join } from 'path';
import { homedir } from 'os';
export default async (release) => {
const asset = getAsset(release.assets);
export default async (release, miscTestBuilds) => {
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) {