mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 23:01:58 +00:00
Make git dependencies faster + further optimize bun install (#15771)
This commit is contained in:
@@ -82,7 +82,7 @@ pub const OS = struct {
|
||||
if (std.fs.openFileAbsolute("/proc/stat", .{})) |file| {
|
||||
defer file.close();
|
||||
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf).unwrap();
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, true).unwrap();
|
||||
defer file_buf.clearRetainingCapacity();
|
||||
const contents = file_buf.items[0..read];
|
||||
|
||||
@@ -124,7 +124,7 @@ pub const OS = struct {
|
||||
if (std.fs.openFileAbsolute("/proc/cpuinfo", .{})) |file| {
|
||||
defer file.close();
|
||||
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf).unwrap();
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, true).unwrap();
|
||||
defer file_buf.clearRetainingCapacity();
|
||||
const contents = file_buf.items[0..read];
|
||||
|
||||
@@ -175,7 +175,7 @@ pub const OS = struct {
|
||||
if (std.fs.openFileAbsolute(path, .{})) |file| {
|
||||
defer file.close();
|
||||
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf).unwrap();
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, true).unwrap();
|
||||
defer file_buf.clearRetainingCapacity();
|
||||
const contents = file_buf.items[0..read];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user