From 01327d6ef1bc66c558eadbdac82e402109797544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 12 Oct 2021 13:36:24 +0200 Subject: [PATCH] CommandLineInterface: Don't return zero exit code when writing linked files to disk fails --- Changelog.md | 1 + solc/CommandLineInterface.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index 88b9bde88..142682fea 100644 --- a/Changelog.md +++ b/Changelog.md @@ -15,6 +15,7 @@ Compiler Features: Bugfixes: * Commandline Interface: Fix extra newline character being appended to sources passed through standard input, affecting their hashes. * Commandline Interface: Report output selection options unsupported by the selected input mode instead of ignoring them. + * Commandline Interface: Don't return zero exit code when writing linked files to disk fails. * SMTChecker: Fix internal error in magic type access (``block``, ``msg``, ``tx``). * TypeChecker: Fix internal error when using user defined value types in public library functions. * Yul IR Generator: Do not output empty switches/if-bodies for empty contracts. diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index dc07b499d..6c24b7742 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -937,6 +937,7 @@ void CommandLineInterface::writeLinkedFiles() if (!outFile) { serr() << "Could not write to file " << src.first << ". Aborting." << endl; + m_outputFailed = true; return; } }