chore: dont cache if customDownloadUrl
This commit is contained in:
@@ -26,7 +26,7 @@ const main = async() => {
|
||||
|
||||
info(`Going to install release ${release.version}`);
|
||||
|
||||
await install(release, token);
|
||||
await install(release, token, customDownloadUrl === null);
|
||||
|
||||
setOutput('bun-version', release.tag_name);
|
||||
} catch(e) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { join } from 'path';
|
||||
import { homedir } from 'os';
|
||||
import { readdirSync } from 'fs';
|
||||
|
||||
export default async(release: Release, token: string) => {
|
||||
export default async(release: Release, token: string, customUrl: boolean) => {
|
||||
const asset = getAsset(release.assets);
|
||||
const path = join(homedir(), '.bun', 'bin', asset.name);
|
||||
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
|
||||
@@ -34,9 +34,12 @@ export default async(release: Release, token: string) => {
|
||||
'bun',
|
||||
release.version
|
||||
);
|
||||
await saveCache([
|
||||
join(extracted, asset.name)
|
||||
], `bun-${process.platform}-${asset.name}-${release.version}`);
|
||||
|
||||
if (!customUrl) {
|
||||
await saveCache([
|
||||
join(extracted, asset.name)
|
||||
], `bun-${process.platform}-${asset.name}-${release.version}`);
|
||||
}
|
||||
|
||||
info(`Cached Bun to ${newCache}.`);
|
||||
addPath(newCache);
|
||||
|
||||
Reference in New Issue
Block a user