Skip to content

Commit

Permalink
bun run load bunfig.toml to decide if to force bun
Browse files Browse the repository at this point in the history
  • Loading branch information
RiskyMH committed Jan 23, 2025
1 parent 7830e15 commit d4ed8f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cli/run_command.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1397,17 +1397,17 @@ pub const RunCommand = struct {

// setup

if (!ctx.debug.loaded_bunfig) {
bun.CLI.Arguments.loadConfigPath(ctx.allocator, true, "bunfig.toml", ctx, .RunCommand) catch {};
}

const force_using_bun = ctx.debug.run_in_bun;
var ORIGINAL_PATH: string = "";
var this_transpiler: transpiler.Transpiler = undefined;
const root_dir_info = try configureEnvForRun(ctx, &this_transpiler, null, log_errors, false);
try configurePathForRun(ctx, root_dir_info, &this_transpiler, &ORIGINAL_PATH, root_dir_info.abs_path, force_using_bun);
this_transpiler.env.map.put("npm_command", "run-script") catch unreachable;

if (!ctx.debug.loaded_bunfig) {
bun.CLI.Arguments.loadConfigPath(ctx.allocator, true, "bunfig.toml", ctx, .RunCommand) catch {};
}

// check for empty command

if (target_name.len == 0) {
Expand Down

0 comments on commit d4ed8f8

Please sign in to comment.