From e11a8397602b23997e9ebfbd1b865dab4f6a18d1 Mon Sep 17 00:00:00 2001 From: Nameless Date: Thu, 5 Oct 2023 12:29:49 -0500 Subject: [PATCH] std.http: use loadDefaultProxies in compiler --- lib/std/std.zig | 2 +- src/main.zig | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/std/std.zig b/lib/std/std.zig index 5829a241c4c8925e063ce0b8d1f55e8754c0dcb1..7342cadbefdb24d34b6d4b7f81d44c5c91e93e6e 100644 --- a/lib/std/std.zig +++ b/lib/std/std.zig @@ -285,7 +285,7 @@ pub const options = struct { /// By default, std.http.Client will support HTTPS connections. Set this option to `true` to /// disable TLS support. - /// + /// /// This will likely reduce the size of the binary, but it will also make it impossible to /// make a HTTPS connection. pub const http_disable_tls = if (@hasDecl(options_override, "http_disable_tls")) diff --git a/src/main.zig b/src/main.zig index 07e7d088ea31d5e0c2f69c42d9c09dcb16b7c88f..8bf2cc1dd0e3f62a84ae0f410702b1bd5b074e46 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5128,6 +5128,8 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi var http_client: std.http.Client = .{ .allocator = gpa }; defer http_client.deinit(); + try http_client.loadDefaultProxies(); + var progress: std.Progress = .{ .dont_print_on_dumb = true }; const root_prog_node = progress.start("Fetch Packages", 0); defer root_prog_node.end(); @@ -7039,6 +7041,8 @@ fn cmdFetch( var http_client: std.http.Client = .{ .allocator = gpa }; defer http_client.deinit(); + try http_client.loadDefaultProxies(); + var progress: std.Progress = .{ .dont_print_on_dumb = true }; const root_prog_node = progress.start("Fetch", 0); defer root_prog_node.end(); -- 2.54.0