Skip to content

Commit

Permalink
Fix cache dir for bun
Browse files Browse the repository at this point in the history
  • Loading branch information
pastelsky authored Nov 2, 2024
1 parent 77e0868 commit 78d5e00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/package/installation.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,17 @@ const InstallationUtils = {

command = `pnpm add ${packageStrings.join(" ")} --${flags.join(" --")}`;
} else if (client === "bun") {
const cacheDir = path.join(tmpFolder, "cache")
flags = [
"no-save",
"exact",
"no-progress",
`cache-dir ${path.join(tmpFolder, "cache")}`,
`cache-dir ${cacheDir}`,
];

// Set the BUN_INSTALL_CACHE_DIR environment variable
// See https://github.com/oven-sh/bun/issues/6423
process.env.BUN_INSTALL_CACHE_DIR = cacheDir;
command = `bun install ${packageStrings.join(" ")} --${flags.join(
" --",
)}`;
Expand Down

0 comments on commit 78d5e00

Please sign in to comment.