mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
fix(install): clone arena memory on manifest parse errors (#20925)
This commit is contained in:
@@ -1572,7 +1572,14 @@ pub const PackageManifest = struct {
|
||||
source,
|
||||
log,
|
||||
arena.allocator(),
|
||||
) catch return null;
|
||||
) catch {
|
||||
// don't use the arena memory!
|
||||
var cloned_log: logger.Log = .init(bun.default_allocator);
|
||||
try log.cloneToWithRecycled(&cloned_log, true);
|
||||
log.* = cloned_log;
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
if (json.asProperty("error")) |error_q| {
|
||||
if (error_q.expr.asString(allocator)) |err| {
|
||||
|
||||
Reference in New Issue
Block a user