From 13710b49cc40c0e78eec9a94ce9b0ea8a09c3860 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 2 Aug 2020 00:47:53 +0200 Subject: git-sugpatch: Print error and exit on `Config::get` error Add `exitcode` to exit with an appropriate code. Add the `gseprintln` macro to wrap `eprintln!()`, prefixing the output with "error: ". --- Cargo.lock | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 4be1b47..f0130fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -173,6 +173,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "exitcode" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de853764b47027c2e862a995c34978ffa63c1501f2e15f987ba11bd4f9bba193" + [[package]] name = "fnv" version = "1.0.7" @@ -285,6 +291,7 @@ dependencies = [ name = "github-suggestion-cli" version = "0.0.1" dependencies = [ + "exitcode", "getopts", "git2", "github-suggestion", -- cgit v1.2.3