From 94e5823bbdbe8dce8b2a50c80671aba062a6bcfd Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Tue, 15 Aug 2023 18:19:36 -0700 Subject: [PATCH] Fix priority order --- src/cli.zig | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cli.zig b/src/cli.zig index 97aaa37135..c0de8ae4f5 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -299,18 +299,6 @@ pub const Arguments = struct { if (comptime cmd.readGlobalConfig()) brk: { if (ctx.has_loaded_global_config) break :brk; - if (getRootBunfigPath(&config_buf)) |path| { - Output.debug("trying to load {s}\n", .{path}); - const success = loadConfigPath(allocator, true, path, ctx, comptime cmd) catch false; - if (success) { - Output.debug("successfully loaded global bunfig\n", .{}); - ctx.has_loaded_global_config = true; - break :brk; - } else { - Output.debug("failed to load global bunfig\n", .{}); - } - } - if (getRootBunJSONPath(&config_buf)) |path| { Output.debug("trying to load {s}\n", .{path}); const success = loadConfigPath(allocator, true, path, ctx, comptime cmd) catch false; @@ -322,6 +310,18 @@ pub const Arguments = struct { Output.debug("failed to load global bun.json\n", .{}); } } + + if (getRootBunfigPath(&config_buf)) |path| { + Output.debug("trying to load {s}\n", .{path}); + const success = loadConfigPath(allocator, true, path, ctx, comptime cmd) catch false; + if (success) { + Output.debug("successfully loaded global bunfig\n", .{}); + ctx.has_loaded_global_config = true; + break :brk; + } else { + Output.debug("failed to load global bunfig\n", .{}); + } + } } var config_path: [:0]u8 = undefined;