From 31a5e5bfef086c1cac477661dd627fa774bc44f5 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 10 Mar 2017 19:11:01 +0100 Subject: Do not overwrite files unless forced. --- solc/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'solc/main.cpp') diff --git a/solc/main.cpp b/solc/main.cpp index 28726e26..c61da6e9 100644 --- a/solc/main.cpp +++ b/solc/main.cpp @@ -58,15 +58,16 @@ int main(int argc, char** argv) return 1; if (!cli.processInput()) return 1; + bool success = false; try { - cli.actOnInput(); + success = cli.actOnInput(); } catch (boost::exception const& _exception) { cerr << "Exception during output generation: " << boost::diagnostic_information(_exception) << endl; - return 1; + success = false; } - return 0; + return success ? 0 : 1; } -- cgit v1.2.3