Skip to content

Commit 1a4bbe9

Browse files
authored
Merge pull request #703 from squidpickles/optional-backtrace
Update to error-chain 0.5.0 to allow optional backtrace. #591
2 parents 78482c7 + 038286e commit 1a4bbe9

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

Cargo.lock

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ msi-installed = []
3535
rustup-dist = { path = "src/rustup-dist", version = "0.6.3" }
3636
rustup-utils = { path = "src/rustup-utils", version = "0.6.3" }
3737
download = { path = "src/download" }
38-
error-chain = "0.4.0"
38+
error-chain = "0.5.0"
3939
clap = "2.2.4"
4040
regex = "0.1.41"
4141
url = "1.1.0"

src/download/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ hyper-backend = ["hyper", "env_proxy", "native-tls", "openssl-sys"]
1515
rustls-backend = ["hyper", "env_proxy", "rustls", "lazy_static", "ca-loader"]
1616

1717
[dependencies]
18-
error-chain = "0.4.0"
18+
error-chain = "0.5.0"
1919
url = "1.1"
2020
curl = { version = "0.3", optional = true }
2121
lazy_static = { version = "0.2", optional = true }

src/rustup-cli/common.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,11 @@ pub fn report_error(e: &Error) {
353353
}
354354

355355
if show_backtrace() {
356-
info!("backtrace:");
357-
println!("");
358-
println!("{:?}", e.backtrace());
356+
if let Some(backtrace) = e.backtrace() {
357+
info!("backtrace:");
358+
println!("");
359+
println!("{:?}", backtrace);
360+
}
359361
} else {
360362
}
361363

src/rustup-dist/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ walkdir = "0.1.5"
2424
toml = "0.1.27"
2525
sha2 = "0.1.2"
2626
rustup-utils = { path = "../rustup-utils", version = "0.6.3" }
27-
error-chain = "0.4.0"
27+
error-chain = "0.5.0"
2828
rustup-mock = { path = "../rustup-mock", version = "0.6.3" }
2929

3030
[target."cfg(windows)".dependencies]

src/rustup-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license = "MIT OR Apache-2.0"
1414
[dependencies]
1515
rand = "0.3.11"
1616
scopeguard = "0.1.2"
17-
error-chain = "0.4.0"
17+
error-chain = "0.5.0"
1818
libc = "0.2.0"
1919
rustc-serialize = "0.3.19"
2020
sha2 = "0.1.2"

0 commit comments

Comments
 (0)