aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/install/install.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/install/install.zig b/src/install/install.zig
index 60d8e2fdf..7ea14acf6 100644
--- a/src/install/install.zig
+++ b/src/install/install.zig
@@ -2482,11 +2482,6 @@ pub const PackageManager = struct {
return CacheDir{ .path = dir, .is_node_modules = false };
}
- if (env_loader.map.get("HOME")) |dir| {
- var parts = [_]string{ dir, ".bun/", "install/", "cache/" };
- return CacheDir{ .path = Fs.FileSystem.instance.abs(&parts), .is_node_modules = false };
- }
-
if (env_loader.map.get("BUN_INSTALL")) |dir| {
var parts = [_]string{ dir, "install/", "cache/" };
return CacheDir{ .path = Fs.FileSystem.instance.abs(&parts), .is_node_modules = false };
@@ -2497,6 +2492,11 @@ pub const PackageManager = struct {
return CacheDir{ .path = Fs.FileSystem.instance.abs(&parts), .is_node_modules = false };
}
+ if (env_loader.map.get("HOME")) |dir| {
+ var parts = [_]string{ dir, ".bun/", "install/", "cache/" };
+ return CacheDir{ .path = Fs.FileSystem.instance.abs(&parts), .is_node_modules = false };
+ }
+
var fallback_parts = [_]string{"node_modules/.bun-cache"};
return CacheDir{ .is_node_modules = true, .path = Fs.FileSystem.instance.abs(&fallback_parts) };
}