aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar pan93412 <pan93412@gmail.com> 2023-09-18 00:09:57 +0800
committerGravatar GitHub <noreply@github.com> 2023-09-17 09:09:57 -0700
commit25aa51dfc4976d1477d2714e5742393f190dc39f (patch)
tree078dfb8d037edbedb9e7fabbc687a2f68e9fda06
parentc6b25adeea36b76045553eaa2af75d3a14f71a2d (diff)
downloadbun-25aa51dfc4976d1477d2714e5742393f190dc39f.tar.gz
bun-25aa51dfc4976d1477d2714e5742393f190dc39f.tar.zst
bun-25aa51dfc4976d1477d2714e5742393f190dc39f.zip
fix(install): Return NotSupported when errno == XDEV (#5610)
-rw-r--r--src/install/install.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/install/install.zig b/src/install/install.zig
index 1e55d7807..722d46be1 100644
--- a/src/install/install.zig
+++ b/src/install/install.zig
@@ -1070,6 +1070,7 @@ const PackageInstall = struct {
)) {
0 => {},
else => |errno| switch (std.os.errno(errno)) {
+ .XDEV => return error.NotSupported, // not same file system
.OPNOTSUPP => return error.NotSupported,
.NOENT => return error.FileNotFound,
// sometimes the downlowded npm package has already node_modules with it, so just ignore exist error here
@@ -1128,6 +1129,7 @@ const PackageInstall = struct {
)) {
0 => .{ .success = {} },
else => |errno| switch (std.os.errno(errno)) {
+ .XDEV => error.NotSupported, // not same file system
.OPNOTSUPP => error.NotSupported,
.NOENT => error.FileNotFound,
// We first try to delete the directory