chg: not showing banner when executing direct from shell

This commit is contained in:
iceman1001 2017-10-22 11:05:25 +02:00
commit 2aa17c0ddc

View file

@ -355,11 +355,6 @@ int main(int argc, char* argv[]) {
return 1; return 1;
} }
#if defined(__linux__) || (__APPLE__)
// ascii art doesn't work well on mingw :(
showBanner();
#endif
// lets copy the comport string. // lets copy the comport string.
memset(comport, 0, sizeof(comport)); memset(comport, 0, sizeof(comport));
memcpy(comport, argv[1], strlen(argv[1])); memcpy(comport, argv[1], strlen(argv[1]));
@ -438,6 +433,14 @@ int main(int argc, char* argv[]) {
return 2; return 2;
} }
#if defined(__linux__) || (__APPLE__)
// ascii art doesn't work well on mingw :(
bool stdinOnPipe = !isatty(STDIN_FILENO);
if ( executeCommand || script_cmds_file || stdinOnPipe )
showBanner();
#endif
// set global variables // set global variables
set_my_executable_path(); set_my_executable_path();