mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 00:07:46 +02:00
Refactor: Construct IoError
from std::io::Error
instead of std::io::ErrorKind
(#15777)
This commit is contained in:
@ -1048,7 +1048,7 @@ impl ForegroundGuard {
|
||||
// This should always succeed, frankly, but handle the error just in case
|
||||
setpgid(Pid::from_raw(0), Pid::from_raw(0)).map_err(|err| {
|
||||
nu_protocol::shell_error::io::IoError::new_internal(
|
||||
std::io::Error::from(err).kind(),
|
||||
std::io::Error::from(err),
|
||||
"Could not set pgid",
|
||||
nu_protocol::location!(),
|
||||
)
|
||||
|
@ -12,7 +12,7 @@ use nu_plugin_protocol::{
|
||||
use nu_protocol::{
|
||||
BlockId, ByteStreamType, Config, CustomValue, IntoInterruptiblePipelineData, LabeledError,
|
||||
PipelineData, PluginSignature, ShellError, Signals, Span, Spanned, Value, VarId,
|
||||
engine::Closure,
|
||||
engine::Closure, shell_error,
|
||||
};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
@ -91,7 +91,7 @@ fn manager_consume_all_exits_after_streams_and_interfaces_are_dropped() -> Resul
|
||||
|
||||
fn test_io_error() -> ShellError {
|
||||
ShellError::Io(IoError::new_with_additional_context(
|
||||
std::io::ErrorKind::Other,
|
||||
shell_error::io::ErrorKind::from_std(std::io::ErrorKind::Other),
|
||||
Span::test_data(),
|
||||
None,
|
||||
"test io error",
|
||||
|
Reference in New Issue
Block a user