Merge pull request #501 from VoR0220/quitIfNoArguments

Make solc quit if no arguments are supplied to the compiler.
This commit is contained in:
chriseth 2016-05-17 17:02:51 +02:00
commit 5bf059dc2a

View File

@ -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;