aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-09-19 03:58:55 -0700
committerGravatar GitHub <noreply@github.com> 2023-09-19 03:58:55 -0700
commit4b5dcc8a6a77980e16dd48bd52821918d140700c (patch)
tree2a84c013e2dafe73a1d50e979ce37071d6aaa8d5 /src
parentd2328285f952537603fa2cbcdef44fde50c69b82 (diff)
downloadbun-4b5dcc8a6a77980e16dd48bd52821918d140700c.tar.gz
bun-4b5dcc8a6a77980e16dd48bd52821918d140700c.tar.zst
bun-4b5dcc8a6a77980e16dd48bd52821918d140700c.zip
Make bun install --verbose more verbose (#5726)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/http_client_async.zig8
-rw-r--r--src/install/install.zig7
2 files changed, 11 insertions, 4 deletions
diff --git a/src/http_client_async.zig b/src/http_client_async.zig
index b3c06df56..a78358066 100644
--- a/src/http_client_async.zig
+++ b/src/http_client_async.zig
@@ -2289,10 +2289,6 @@ pub fn onWritable(this: *HTTPClient, comptime is_first_call: bool, comptime is_s
};
}
- if (this.verbose) {
- printRequest(request);
- }
-
const headers_len = list.items.len;
std.debug.assert(list.items.len == writer.context.items.len);
if (this.state.request_body.len > 0 and list.capacity - list.items.len > 0 and !this.proxy_tunneling) {
@@ -2327,6 +2323,10 @@ pub fn onWritable(this: *HTTPClient, comptime is_first_call: bool, comptime is_s
this.state.request_sent_len += @as(usize, @intCast(amount));
const has_sent_headers = this.state.request_sent_len >= headers_len;
+ if (has_sent_headers and this.verbose) {
+ printRequest(request);
+ }
+
if (has_sent_headers and this.state.request_body.len > 0) {
this.state.request_body = this.state.request_body[this.state.request_sent_len - headers_len ..];
}
diff --git a/src/install/install.zig b/src/install/install.zig
index 158130b25..c7a2816a5 100644
--- a/src/install/install.zig
+++ b/src/install/install.zig
@@ -358,6 +358,10 @@ const NetworkTask = struct {
);
this.http.client.reject_unauthorized = this.package_manager.tlsRejectUnauthorized();
+ if (PackageManager.verbose_install) {
+ this.http.client.verbose = true;
+ }
+
this.callback = .{
.package_manifest = .{
.name = try strings.StringOrTinyString.initAppendIfNeeded(name, *FileSystem.FilenameStore, &FileSystem.FilenameStore.instance),
@@ -437,6 +441,9 @@ const NetworkTask = struct {
null,
);
this.http.client.reject_unauthorized = this.package_manager.tlsRejectUnauthorized();
+ if (PackageManager.verbose_install) {
+ this.http.client.verbose = true;
+ }
this.callback = .{ .extract = tarball };
}
=retro' width='13' height='13' alt='Gravatar' /> TK 1-2/+2 2024-03-28feat: allow dynamic route segments in isr.exclude array (#10513)Gravatar TK 5-3/+69 2024-03-28[ci] formatGravatar Houston (Bot) 2-3/+3 2024-03-28[ci] release (#10597)Gravatar Houston (Bot) 37-66/+89 2024-03-28db: Rework index config with generated index names (#10589)Gravatar Ben Holmes 6-68/+344