diff options
author | Mike Gerwitz <mike.gerwitz@ryansg.com> | 2020-03-25 14:27:10 -0400 |
---|---|---|
committer | Mike Gerwitz <mike.gerwitz@ryansg.com> | 2020-03-26 09:08:13 -0400 |
commit | 7a972465ead33323f1bacb35e17b016b6949aadd (patch) | |
tree | 2ae30c17ebd7f767f0f73d2663a276ef32748296 /tamer/src/bin | |
parent | 05d03dc4bbdcffae7fb1424ff5a9d78dc68eb0c2 (diff) | |
download | tame-7a972465ead33323f1bacb35e17b016b6949aadd.tar.gz tame-7a972465ead33323f1bacb35e17b016b6949aadd.tar.bz2 tame-7a972465ead33323f1bacb35e17b016b6949aadd.zip |
[DEV-7087] TAMER: tameld: Format error output
We will want an option for verbose debug output in the future.
Diffstat (limited to 'tamer/src/bin')
-rw-r--r-- | tamer/src/bin/tameld.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tamer/src/bin/tameld.rs b/tamer/src/bin/tameld.rs index e3ca4b0..bf91e94 100644 --- a/tamer/src/bin/tameld.rs +++ b/tamer/src/bin/tameld.rs @@ -45,7 +45,15 @@ pub fn main() -> Result<(), Box<dyn Error>> { let usage = opts.usage(&format!("Usage: {} -o OUTPUT FILE", program)); match parse_options(opts, args) { - Ok(Command::Link(input, output)) => poc::main(&input, &output), + Ok(Command::Link(input, output)) => match poc::main(&input, &output) { + Err(e) => { + eprintln!("error: {}", e); + eprintln!("fatal: failed to link `{}`", output); + + std::process::exit(1); + } + ok => ok, + }, Ok(Command::Usage) => { println!("{}", usage); std::process::exit(exitcode::OK); |