Fix fallback to copyfile

This commit is contained in:
Jarred Sumner
2023-10-27 02:36:10 -07:00
parent 700f932ddf
commit 8d2e0725e7

View File

@@ -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 },
},