diff options
author | chriseth <c@ethdev.com> | 2016-05-17 23:02:51 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-05-17 23:02:51 +0800 |
commit | 5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7 (patch) | |
tree | 1b9adfd7fe9acd1aaa5be91968a9801d1c874f9d | |
parent | 77f3a85441d7941998df6d3951449cd3af91a1cf (diff) | |
parent | fb89e6906192df2ee7e3746e6d129f15d7d2d3d0 (diff) | |
download | dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.tar dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.tar.gz dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.tar.bz2 dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.tar.lz dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.tar.xz dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.tar.zst dexon-solidity-5bf059dc2a1f82a0bf2e8fb9ab06439d01bf29f7.zip |
Merge pull request #501 from VoR0220/quitIfNoArguments
Make solc quit if no arguments are supplied to the compiler.
-rw-r--r-- | solc/CommandLineInterface.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 003ad030..21624b3b 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -22,6 +22,13 @@ */ #include "CommandLineInterface.h" +#ifdef _WIN32 // windows + #include <io.h> + #define isatty _isatty + #define fileno _fileno +#else // unix + #include <unistd.h> +#endif #include <string> #include <iostream> #include <fstream> @@ -478,7 +485,7 @@ Allowed options)", return false; } - if (m_args.count("help")) + if (m_args.count("help") || (isatty(fileno(stdin)) && _argc == 1)) { cout << desc; return false; |