mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
much better and simpler way of handling this
This commit is contained in:
parent
73ede5bb38
commit
fb89e69061
@ -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