diff options
author | 2023-10-27 02:36:10 -0700 | |
---|---|---|
committer | 2023-10-27 02:36:10 -0700 | |
commit | 8d2e0725e79273e46758d8efe35aca477e82fb5b (patch) | |
tree | a57ed837f35293b969fb7b5313679660bb344c13 | |
parent | 700f932ddf612d1f7722d6b293ff82dbfdd96bfd (diff) | |
download | bun-8d2e0725e79273e46758d8efe35aca477e82fb5b.tar.gz bun-8d2e0725e79273e46758d8efe35aca477e82fb5b.tar.zst bun-8d2e0725e79273e46758d8efe35aca477e82fb5b.zip |
Fix fallback to copyfile
-rw-r--r-- | src/install/install.zig | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/install/install.zig b/src/install/install.zig index dbe03f7c6..57ef430c1 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -1650,12 +1650,16 @@ const PackageInstall = struct { .hardlink => { if (this.installWithHardlink()) |result| { return result; - } else |err| { + } else |err| outer: { + if (comptime !Environment.isWindows) { + if (err == error.NotSameFileSystem) { + supported_method = .copyfile; + supported_method_to_use = .copyfile; + break :outer; + } + } + switch (err) { - // error.ENXIO => { - // supported_method = .copyfile; - // supported_method_to_use = .copyfile; - // }, error.FileNotFound => return Result{ .fail = .{ .err = error.FileNotFound, .step = .opening_cache_dir }, }, |