aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bundler/bundle_v2.zig8
-rw-r--r--src/cli/build_command.zig2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig
index 7f2437619..dbf2025ba 100644
--- a/src/bundler/bundle_v2.zig
+++ b/src/bundler/bundle_v2.zig
@@ -1015,13 +1015,13 @@ pub const BundleV2 = struct {
var this = try BundleV2.init(bundler, allocator, event_loop, enable_reloading, null, null);
this.unique_key = unique_key;
- if (this.bundler.log.msgs.items.len > 0) {
+ if (this.bundler.log.hasErrors()) {
return error.BuildFailed;
}
this.graph.pool.pool.schedule(try this.enqueueEntryPoints(this.bundler.options.entry_points));
- if (this.bundler.log.msgs.items.len > 0) {
+ if (this.bundler.log.hasErrors()) {
return error.BuildFailed;
}
@@ -1031,7 +1031,7 @@ pub const BundleV2 = struct {
source_code_size.* = this.source_code_length;
if (this.graph.use_directive_entry_points.len > 0) {
- if (this.bundler.log.msgs.items.len > 0) {
+ if (this.bundler.log.hasErrors()) {
return error.BuildFailed;
}
@@ -1039,7 +1039,7 @@ pub const BundleV2 = struct {
this.waitForParse();
}
- if (this.bundler.log.msgs.items.len > 0) {
+ if (this.bundler.log.hasErrors()) {
return error.BuildFailed;
}
diff --git a/src/cli/build_command.zig b/src/cli/build_command.zig
index 6609facac..957cbc9b7 100644
--- a/src/cli/build_command.zig
+++ b/src/cli/build_command.zig
@@ -232,7 +232,7 @@ pub const BuildCommand = struct {
ctx.args,
);
- if (log.msgs.items.len > 0) {
+ if (log.hasErrors()) {
try log.printForLogLevel(Output.errorWriter());
if (result.errors.len > 0 or result.output_files.len == 0) {