diff options
author | 2023-09-12 03:35:29 -0700 | |
---|---|---|
committer | 2023-09-12 03:35:29 -0700 | |
commit | 6e4f746ace3a42c1a5c9431beba2ae599a6f15b0 (patch) | |
tree | 4d20e51072887d443cf008179ffee19307bdb90c /src/cli | |
parent | b5a3bed7f2b0b511a5de3ba4a35813338b410703 (diff) | |
download | bun-6e4f746ace3a42c1a5c9431beba2ae599a6f15b0.tar.gz bun-6e4f746ace3a42c1a5c9431beba2ae599a6f15b0.tar.zst bun-6e4f746ace3a42c1a5c9431beba2ae599a6f15b0.zip |
Fix some bugs blocking Turborepo from using `bun run` (#5071)
* Clean up some error handling when loading `tsconfig.json`
* [bun run] don't parse tsconfig.json for package.json scripts
* Make this error message better
* Bump
* Don't print build errors twice
* Handle quotes in error messages a little better
* Add a couple tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/run_command.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index dcb5312b1..42560947a 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -482,6 +482,10 @@ pub const RunCommand = struct { this_bundler.resolver.care_about_bin_folder = true; this_bundler.resolver.care_about_scripts = true; + + this_bundler.resolver.opts.load_tsconfig_json = false; + this_bundler.options.load_tsconfig_json = false; + this_bundler.configureLinker(); var root_dir_info = this_bundler.resolver.readDirInfo(this_bundler.fs.top_level_dir) catch |err| { @@ -491,7 +495,7 @@ pub const RunCommand = struct { } else { ctx.log.printForLogLevelWithEnableAnsiColors(Output.errorWriter(), false) catch {}; } - Output.prettyErrorln("Error loading directory: \"{s}\"", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error<r><d>:<r> <b>{s}<r> loading directory {}", .{ @errorName(err), strings.QuotedFormatter{ .text = this_bundler.fs.top_level_dir } }); Output.flush(); return err; } orelse { @@ -500,7 +504,7 @@ pub const RunCommand = struct { } else { ctx.log.printForLogLevelWithEnableAnsiColors(Output.errorWriter(), false) catch {}; } - Output.prettyErrorln("Error loading current directory", .{}); + Output.prettyErrorln("error loading current directory", .{}); Output.flush(); return error.CouldntReadCurrentDirectory; }; |