mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 12:38:24 +02:00
fix: extract two times for custom urls
This commit is contained in:
parent
a11484a419
commit
1e0686b2cc
3 changed files with 17 additions and 6 deletions
|
@ -27,14 +27,19 @@ export default async(release: Release, token: string, customUrl: boolean) => {
|
|||
'Authorization': new URL(asset.asset.browser_download_url).host.includes('github.com') ? `token ${token}` : ''
|
||||
}
|
||||
);
|
||||
const extracted = await extractZip(zipPath, join(homedir(), '.bun', 'bin'));
|
||||
console.log(readdirSync(join(homedir(), '.bun', 'bin')));
|
||||
|
||||
let extracted;
|
||||
if (customUrl) {
|
||||
extracted = await extractZip(zipPath, join(homedir(), 'onlyforunzip'));
|
||||
extracted = await extractZip(join(homedir(), 'onlyforunzip', asset.asset.name), join(homedir(), '.bun', 'bin'));
|
||||
} else extracted = await extractZip(zipPath, join(homedir(), '.bun', 'bin'));
|
||||
|
||||
const newCache = await cacheDir(
|
||||
extracted,
|
||||
'bun',
|
||||
release.version
|
||||
);
|
||||
|
||||
|
||||
if (!customUrl) {
|
||||
await saveCache([
|
||||
join(extracted, asset.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue