mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
Improve error handling for which::which
failures
Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
This commit is contained in:
committed by
Blaž Hrastnik
parent
6d724a8f33
commit
cb25d13028
@@ -113,7 +113,7 @@ impl Client {
|
||||
id: usize,
|
||||
) -> Result<(Self, UnboundedReceiver<Payload>)> {
|
||||
// Resolve path to the binary
|
||||
let cmd = helix_stdx::env::which(cmd).map_err(|err| anyhow::anyhow!(err))?;
|
||||
let cmd = helix_stdx::env::which(cmd)?;
|
||||
|
||||
let process = Command::new(cmd)
|
||||
.args(args)
|
||||
|
@@ -19,6 +19,8 @@ pub enum Error {
|
||||
#[error("server closed the stream")]
|
||||
StreamClosed,
|
||||
#[error(transparent)]
|
||||
ExecutableNotFound(#[from] helix_stdx::env::ExecutableNotFoundError),
|
||||
#[error(transparent)]
|
||||
Other(#[from] anyhow::Error),
|
||||
}
|
||||
pub type Result<T> = core::result::Result<T, Error>;
|
||||
|
Reference in New Issue
Block a user