From 25aa51dfc4976d1477d2714e5742393f190dc39f Mon Sep 17 00:00:00 2001 From: pan93412 Date: Mon, 18 Sep 2023 00:09:57 +0800 Subject: fix(install): Return NotSupported when errno == XDEV (#5610) --- src/install/install.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.3