aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2019-12-25 14:25:37 -0600
committerDoug Goldstein <cardoe@cardoe.com>2020-01-26 09:20:18 -0600
commiteca92cad0b67141feb127192262fe22e77e1347e (patch)
treee650277895a4a2739b2142db912f843fbb35a560 /src/main.rs
parentconvert from Cargo package data to cargo_metadata (diff)
downloadcargo-ebuild-eca92cad0b67141feb127192262fe22e77e1347e.tar.gz
cargo-ebuild-eca92cad0b67141feb127192262fe22e77e1347e.tar.bz2
cargo-ebuild-eca92cad0b67141feb127192262fe22e77e1347e.zip
drop Cargo usage
Converted Cargo usage to cargo_metadata so now drop out the last usage which was marshalling the error to the user.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/main.rs b/src/main.rs
index 7999b8e..cca4d4a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,14 +8,11 @@
* except according to those terms.
*/
-extern crate cargo;
extern crate cargo_ebuild;
extern crate structopt;
-use cargo::util::CliError;
use cargo_ebuild::run;
use std::path::PathBuf;
-use std::process;
use structopt::clap::AppSettings;
use structopt::StructOpt;
@@ -52,17 +49,7 @@ fn main() {
// run the actual code
if let Err(e) = run(opt.verbose as u32, opt.quiet, opt.manifest_path) {
- // break apart the error
- let CliError {
- error,
- exit_code,
- unknown: _unknown,
- } = e;
- // display a msg if we got one
- if let Some(msg) = error {
- eprintln!("{}", msg);
- }
- // exit appropriately
- process::exit(exit_code);
+ eprintln!("{}", e);
+ ::std::process::exit(1);
}
}