aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-29 19:42:47 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-29 19:42:47 -0700
commit0cb090f1181e560cfe8e962cea38be062bfda80b (patch)
tree46e9f7d997f9c5b0d385e72950662da437bb9874
parent5fb014876b7eb207d985933714678a71a07777b6 (diff)
downloadbun-0cb090f1181e560cfe8e962cea38be062bfda80b.tar.gz
bun-0cb090f1181e560cfe8e962cea38be062bfda80b.tar.zst
bun-0cb090f1181e560cfe8e962cea38be062bfda80b.zip
Fix garbled text in errors
-rw-r--r--src/bundler/bundle_v2.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig
index 41f7c3e17..ee5e6056b 100644
--- a/src/bundler/bundle_v2.zig
+++ b/src/bundler/bundle_v2.zig
@@ -1945,7 +1945,7 @@ pub const ParseTask = struct {
switch (err) {
error.FileNotFound => {
log.addErrorFmt(
- &Logger.Source.initEmptyFile(file_path.text),
+ &Logger.Source.initEmptyFile(log.msgs.allocator.dupe(u8, file_path.text) catch unreachable),
Logger.Loc.Empty,
allocator,
"File not found {}",
@@ -1954,7 +1954,7 @@ pub const ParseTask = struct {
},
else => {
log.addErrorFmt(
- &Logger.Source.initEmptyFile(file_path.text),
+ &Logger.Source.initEmptyFile(log.msgs.allocator.dupe(u8, file_path.text) catch unreachable),
Logger.Loc.Empty,
allocator,
"{s} reading file: {}",