diff options
author | chriseth <chris@ethereum.org> | 2018-05-14 23:37:38 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-05-17 00:32:44 +0800 |
commit | 970567826905c953134e54c64f129e31b3fc6a05 (patch) | |
tree | 4c0a1a1bd6e9c88a6a6f64ef077000af3abd9dbd /solc/CommandLineInterface.cpp | |
parent | 67ec76f4625bdf5e2777416c07a3e7d89d12bf16 (diff) | |
parent | db5ea8ec0325512af3238918ca0ea297488a5c5d (diff) | |
download | dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.tar dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.tar.gz dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.tar.bz2 dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.tar.lz dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.tar.xz dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.tar.zst dexon-solidity-970567826905c953134e54c64f129e31b3fc6a05.zip |
Merge pull request #3987 from ethereum/solc_remove_stdin
BREAKING Solc: read from stdin only if "-" is explicitly given
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 1f04c68a..89ac8806 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -404,9 +404,7 @@ bool CommandLineInterface::readInputFilesAndConfigureRemappings() { bool ignoreMissing = m_args.count(g_argIgnoreMissingFiles); bool addStdin = false; - if (!m_args.count(g_argInputFile)) - addStdin = true; - else + if (m_args.count(g_argInputFile)) for (string path: m_args[g_argInputFile].as<vector<string>>()) { auto eq = find(path.begin(), path.end(), '='); @@ -450,6 +448,11 @@ bool CommandLineInterface::readInputFilesAndConfigureRemappings() } if (addStdin) m_sourceCodes[g_stdinFileName] = dev::readStandardInput(); + if (m_sourceCodes.size() == 0) + { + cerr << "No input files given. If you wish to use the standard input please specify \"-\" explicity." << endl; + return false; + } return true; } |