summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml44
-rw-r--r--cli/op_error.rs50
2 files changed, 41 insertions, 53 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 0115938f7..2318699f1 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -26,41 +26,41 @@ deno_typescript = { path = "../deno_typescript", version = "0.35.0" }
deno_core = { path = "../core", version = "0.35.0" }
deno_typescript = { path = "../deno_typescript", version = "0.35.0" }
-atty = "0.2.13"
+atty = "0.2.14"
base64 = "0.11.0"
-bytes = "0.5.3"
-byteorder = "1.3.2"
+bytes = "0.5.4"
+byteorder = "1.3.4"
clap = "2.33.0"
dirs = "2.0.2"
dlopen = "0.1.8"
dprint-plugin-typescript = "0.7.0"
-futures = { version = "0.3.1", features = [ "compat", "io-compat" ] }
+futures = { version = "0.3.4", features = [ "compat", "io-compat" ] }
glob = "0.3.0"
http = "0.2.0"
-indexmap = "1.3.0"
+indexmap = "1.3.2"
lazy_static = "1.4.0"
-libc = "0.2.66"
+libc = "0.2.67"
log = "0.4.8"
-notify = { version = "5.0.0-pre.2" }
-rand = "0.7.2"
-regex = "1.3.1"
+notify = "5.0.0-pre.2"
+rand = "0.7.3"
+regex = "1.3.4"
remove_dir_all = "0.5.2"
-reqwest = { version = "0.10.2", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] }
-ring = "0.16.9"
-rustyline = "5.0.6"
+reqwest = { version = "0.10.4", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] }
+ring = "0.16.11"
+rustyline = "6.0.0"
serde = { version = "1.0.104", features = ["derive"] }
serde_derive = "1.0.104"
-serde_json = { version = "1.0.44", features = [ "preserve_order" ] }
+serde_json = { version = "1.0.48", features = [ "preserve_order" ] }
source-map-mappings = "0.5.0"
-sys-info = "=0.5.8" # 0.5.9 seems to be broken on windows.
+sys-info = "=0.5.8" # 0.5.9 and 0.5.10 are broken on windows.
tempfile = "3.1.0"
-termcolor = "1.0.5"
-tokio = { version = "0.2", features = ["rt-core", "tcp", "udp", "process", "fs", "blocking", "sync", "io-std", "macros", "time"] }
-tokio-rustls = "0.12.1"
-url = "2.1.0"
+termcolor = "1.1.0"
+tokio = { version = "0.2.13", features = ["rt-core", "tcp", "udp", "process", "fs", "blocking", "sync", "io-std", "macros", "time"] }
+tokio-rustls = "0.13.0"
+url = "2.1.1"
utime = "0.2.1"
-webpki = "0.21.0"
-webpki-roots = "0.17.0"
+webpki = "0.21.2"
+webpki-roots = "0.19.0"
walkdir = "2.3.1"
[target.'cfg(windows)'.dependencies]
@@ -68,10 +68,10 @@ winapi = "0.3.8"
fwdansi = "1.1.0"
[target.'cfg(unix)'.dependencies]
-nix = "0.14.1"
+nix = "0.14" # rustyline depends on 0.14, to avoid duplicates we do too.
[dev-dependencies]
os_pipe = "0.9.1"
[target.'cfg(unix)'.dev-dependencies]
-pty = "0.2"
+pty = "0.2.2"
diff --git a/cli/op_error.rs b/cli/op_error.rs
index d35c99895..a2cf03a66 100644
--- a/cli/op_error.rs
+++ b/cli/op_error.rs
@@ -261,11 +261,11 @@ impl From<&ReadlineError> for OpError {
fn from(error: &ReadlineError) -> Self {
use ReadlineError::*;
let kind = match error {
- Io(err) => return err.into(),
+ Io(err) => return OpError::from(err),
Eof => ErrorKind::UnexpectedEof,
Interrupted => ErrorKind::Interrupted,
#[cfg(unix)]
- Errno(err) => return err.into(),
+ Errno(err) => return (*err).into(),
_ => unimplemented!(),
};
@@ -300,35 +300,23 @@ impl From<&serde_json::error::Error> for OpError {
}
#[cfg(unix)]
-mod unix {
- use super::{ErrorKind, OpError};
- use nix::errno::Errno::*;
- pub use nix::Error;
- use nix::Error::Sys;
-
- impl From<Error> for OpError {
- fn from(error: Error) -> Self {
- OpError::from(&error)
- }
- }
+impl From<nix::Error> for OpError {
+ fn from(error: nix::Error) -> Self {
+ use nix::errno::Errno::*;
+ let kind = match error {
+ nix::Error::Sys(EPERM) => ErrorKind::PermissionDenied,
+ nix::Error::Sys(EINVAL) => ErrorKind::TypeError,
+ nix::Error::Sys(ENOENT) => ErrorKind::NotFound,
+ nix::Error::Sys(UnknownErrno) => unreachable!(),
+ nix::Error::Sys(_) => unreachable!(),
+ nix::Error::InvalidPath => ErrorKind::TypeError,
+ nix::Error::InvalidUtf8 => ErrorKind::InvalidData,
+ nix::Error::UnsupportedOperation => unreachable!(),
+ };
- impl From<&Error> for OpError {
- fn from(error: &Error) -> Self {
- let kind = match error {
- Sys(EPERM) => ErrorKind::PermissionDenied,
- Sys(EINVAL) => ErrorKind::TypeError,
- Sys(ENOENT) => ErrorKind::NotFound,
- Sys(UnknownErrno) => unreachable!(),
- Sys(_) => unreachable!(),
- Error::InvalidPath => ErrorKind::TypeError,
- Error::InvalidUtf8 => ErrorKind::InvalidData,
- Error::UnsupportedOperation => unreachable!(),
- };
-
- Self {
- kind,
- msg: error.to_string(),
- }
+ Self {
+ kind,
+ msg: error.to_string(),
}
}
}
@@ -361,7 +349,7 @@ impl From<ErrBox> for OpError {
fn from(error: ErrBox) -> Self {
#[cfg(unix)]
fn unix_error_kind(err: &ErrBox) -> Option<OpError> {
- err.downcast_ref::<unix::Error>().map(|e| e.into())
+ err.downcast_ref::<nix::Error>().map(|e| (*e).into())
}
#[cfg(not(unix))]