This commit is contained in:
Dylan Conway
2024-08-27 17:46:16 -07:00
committed by GitHub
parent f520715622
commit 1976e5bc00
2 changed files with 11 additions and 1 deletions

View File

@@ -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;
};

View File

@@ -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| {