Skip to content

fix(compile): panic when compiled with --no-terminal flag #28823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ext/node/ops/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ enum HandleType {
}

#[op2(fast)]
pub fn op_node_guess_handle_type(
state: &mut OpState,
rid: u32,
) -> Result<u32, deno_core::error::ResourceError> {
let handle = state.resource_table.get_handle(rid)?;
pub fn op_node_guess_handle_type(state: &mut OpState, rid: u32) -> u32 {
let handle = match state.resource_table.get_handle(rid) {
Ok(handle) => handle,
_ => return HandleType::Unknown as u32,
};

let handle_type = match handle {
ResourceHandle::Fd(handle) => guess_handle_type(handle),
_ => HandleType::Unknown,
};

Ok(handle_type as u32)
handle_type as u32
}

#[cfg(windows)]
Expand Down
Loading