diff --git a/src/install/bin.zig b/src/install/bin.zig index 01cdcbd113..ae8d852208 100644 --- a/src/install/bin.zig +++ b/src/install/bin.zig @@ -483,6 +483,11 @@ pub const Bin = extern struct { const abs_exe_file: [:0]const u16 = dest_buf[0 .. abs_dest_w.len + ".exe".len :0]; bun.sys.File.writeFile(bun.invalid_fd, abs_exe_file, WinBinLinkingShim.embedded_executable_data).unwrap() catch |err| { + if (err == error.EBUSY) { + // exe is most likely running. bunx file has already been updated, ignore error + return; + } + this.err = err; return; }; diff --git a/src/install/install.zig b/src/install/install.zig index cb61f02200..dbb3504a89 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -1207,8 +1207,13 @@ pub fn NewPackageInstall(comptime kind: PkgInstallKind) type { if (!package_json_checker.has_found_version and resolution_tag != .workspace) return false; const found_version = package_json_checker.found_version; + + // exclude build tags from comparsion + // https://github.com/oven-sh/bun/issues/13563 + const found_version_end = strings.lastIndexOfChar(found_version, '+') orelse found_version.len; + const expected_version_end = strings.lastIndexOfChar(this.package_version, '+') orelse this.package_version.len; // Check if the version matches - if (!strings.eql(found_version, this.package_version)) { + if (!strings.eql(found_version[0..found_version_end], this.package_version[0..expected_version_end])) { const offset = brk: { // ASCII only. for (0..found_version.len) |c| {