Fix: NotSameFileSystem at clonefile (#546)

Fixes issue #531

Before this, using 'bun install' on a directory in different filesystem
such as tmpfs (/tmp) would have caused "Error: NotSameFileSystem".

This commit fixes that by handling this error, and at end of function it
will fall back to use copyfile (same as --backend=copyfile)
This commit is contained in:
Aditya Gupta
2022-07-11 18:01:00 +05:30
committed by GitHub
parent 1405158dfb
commit 2659febd1b

View File

@@ -1061,7 +1061,7 @@ const PackageInstall = struct {
return result;
} else |err| {
switch (err) {
error.NotSupported => {
error.NotSameFileSystem, error.NotSupported => {
supported_method = .copyfile;
},
error.FileNotFound => return Result{