mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #501 from VoR0220/quitIfNoArguments
Make solc quit if no arguments are supplied to the compiler.
This commit is contained in:
commit
5bf059dc2a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user