diff options
author | 2023-03-19 20:58:16 -0700 | |
---|---|---|
committer | 2023-03-19 20:58:27 -0700 | |
commit | 0edd8d262da4409f1e5566c47bfed9b3f23636b7 (patch) | |
tree | 35e7e1680cfe57f8cb36b8c673a4ad419a8947cd /src/install | |
parent | 76622e41d66d8d2bdbb11c9981a4e9506b5a78b6 (diff) | |
download | bun-0edd8d262da4409f1e5566c47bfed9b3f23636b7.tar.gz bun-0edd8d262da4409f1e5566c47bfed9b3f23636b7.tar.zst bun-0edd8d262da4409f1e5566c47bfed9b3f23636b7.zip |
Fix bug with scoped aliased dependencies in bun install on macOS
Diffstat (limited to 'src/install')
-rw-r--r-- | src/install/install.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/install/install.zig b/src/install/install.zig index 0927c9335..b8509f50a 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -1058,9 +1058,8 @@ const PackageInstall = struct { fn installWithClonefile(this: *PackageInstall) CloneFileError!Result { if (comptime !Environment.isMac) @compileError("clonefileat() is macOS only."); - if (this.package_name[0] == '@') { - const current = bun.span(this.destination_dir_subpath); - if (strings.indexOfChar(current, std.fs.path.sep)) |slash| { + if (this.destination_dir_subpath[0] == '@') { + if (strings.indexOfCharZ(this.destination_dir_subpath, std.fs.path.sep)) |slash| { this.destination_dir_subpath_buf[slash] = 0; var subdir = this.destination_dir_subpath_buf[0..slash :0]; this.destination_dir.dir.makeDirZ(subdir) catch {}; |