diff options
| author | 2022-12-12 13:38:12 -0800 | |
|---|---|---|
| committer | 2022-12-12 13:38:12 -0800 | |
| commit | 0bb9493e4700b630e19abf48bd2b6bc7db417d9c (patch) | |
| tree | b4048375f02d52aecbcfb4b861f12bc5a85760fe /src/install/install.zig | |
| parent | 14efd03b48019255f636772eea0ff161e3807815 (diff) | |
| download | bun-0bb9493e4700b630e19abf48bd2b6bc7db417d9c.tar.gz bun-0bb9493e4700b630e19abf48bd2b6bc7db417d9c.tar.zst bun-0bb9493e4700b630e19abf48bd2b6bc7db417d9c.zip | |
fix fallback install method
Diffstat (limited to '')
| -rw-r--r-- | src/install/install.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/install/install.zig b/src/install/install.zig index fced43427..592eaf14b 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -1306,7 +1306,7 @@ const PackageInstall = struct { // we'll catch it the next error if (!skip_delete and !strings.eqlComptime(this.destination_dir_subpath, ".")) this.uninstall() catch {}; - const supported_method_to_use = if (strings.eqlComptime(this.cache_dir_subpath, ".") or strings.hasPrefixComptime(this.cache_dir_subpath, "..")) + var supported_method_to_use = if (strings.eqlComptime(this.cache_dir_subpath, ".") or strings.hasPrefixComptime(this.cache_dir_subpath, "..")) Method.symlink else supported_method; @@ -1323,6 +1323,7 @@ const PackageInstall = struct { switch (err) { error.NotSupported => { supported_method = .copyfile; + supported_method_to_use = .copyfile; }, error.FileNotFound => return Result{ .fail = .{ .err = error.FileNotFound, .step = .opening_cache_dir }, @@ -1342,6 +1343,7 @@ const PackageInstall = struct { switch (err) { error.NotSupported => { supported_method = .copyfile; + supported_method_to_use = .copyfile; }, error.FileNotFound => return Result{ .fail = .{ .err = error.FileNotFound, .step = .opening_cache_dir }, @@ -1360,6 +1362,7 @@ const PackageInstall = struct { switch (err) { error.NotSameFileSystem => { supported_method = .copyfile; + supported_method_to_use = .copyfile; }, error.FileNotFound => return Result{ .fail = .{ .err = error.FileNotFound, .step = .opening_cache_dir }, |
