mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
fix build
This commit is contained in:
@@ -431,9 +431,11 @@ pub const RunCommand = struct {
|
||||
if (Environment.isWindows and bun.strings.hasSuffixComptime(executable, ".exe")) {
|
||||
std.debug.assert(std.fs.path.isAbsolute(executable));
|
||||
|
||||
// Using @constCast is safe because we know that `direct_launch_buffer` is the data destination
|
||||
// Using @constCast is safe because we know that
|
||||
// `direct_launch_buffer` is the data destination that assumption is
|
||||
// backed by the immediate assertion.
|
||||
var wpath = @constCast(bun.strings.toNTPath(&BunXFastPath.direct_launch_buffer, executable));
|
||||
std.debug.assert(bun.isSliceInBuffer(u16, wpath, &BunXFastPath.direct_launch_buffer));
|
||||
std.debug.assert(bun.isSliceInBufferT(u16, wpath, &BunXFastPath.direct_launch_buffer));
|
||||
|
||||
std.debug.assert(wpath.len > bun.windows.nt_object_prefix.len + ".exe".len);
|
||||
wpath.len += ".bunx".len - ".exe".len;
|
||||
@@ -1562,7 +1564,7 @@ pub const BunXFastPath = struct {
|
||||
|
||||
/// If this returns, it implies the fast path cannot be taken
|
||||
fn tryLaunch(ctx: Command.Context, path_to_use: [:0]u16, env: *DotEnv.Loader, passthrough: []const []const u8) void {
|
||||
std.debug.assert(bun.isSliceInBuffer(u16, path_to_use, &BunXFastPath.direct_launch_buffer));
|
||||
std.debug.assert(bun.isSliceInBufferT(u16, path_to_use, &BunXFastPath.direct_launch_buffer));
|
||||
var command_line = BunXFastPath.direct_launch_buffer[path_to_use.len..];
|
||||
|
||||
debug("Attempting to find and load bunx file: '{}'", .{bun.fmt.utf16(path_to_use)});
|
||||
|
||||
Reference in New Issue
Block a user