From 90997e2924a9bcd7bdba6b97567e1dbcfdd48fa5 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Sun, 10 Jul 2022 22:50:30 +0530 Subject: [PATCH] Fix: NotSameFileSystem at clonefile 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) --- src/install/install.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/install.zig b/src/install/install.zig index fb53b8eccbbb..258a8aae0b5f 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -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{