mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Use io::Error::other in gh_token.rs
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
abbee83ec4
commit
17914a09e5
1 changed files with 2 additions and 6 deletions
|
@ -28,10 +28,7 @@ pub(super) async fn get() -> io::Result<Zeroizing<Box<str>>> {
|
||||||
.map(|token| Zeroizing::new(token.into()))
|
.map(|token| Zeroizing::new(token.into()))
|
||||||
})
|
})
|
||||||
.ok_or_else(|| {
|
.ok_or_else(|| {
|
||||||
io::Error::new(
|
io::Error::other("Password not found in `git credential fill` output")
|
||||||
io::ErrorKind::Other,
|
|
||||||
"Password not found in `git credential fill` output",
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +83,7 @@ impl CommandExt for Command {
|
||||||
} else {
|
} else {
|
||||||
zeroize_and_drop(stdout);
|
zeroize_and_drop(stdout);
|
||||||
|
|
||||||
Err(io::Error::new(
|
Err(io::Error::other(
|
||||||
io::ErrorKind::Other,
|
|
||||||
format!("`{:?}` process exited with `{status}`", self.as_std()),
|
format!("`{:?}` process exited with `{status}`", self.as_std()),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue