diff --git a/src/downloader.cpp b/src/downloader.cpp index 8de7a9a..bf53509 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -121,6 +121,10 @@ int Downloader::login() { char *pwd; std::string email; + if (!isatty(STDIN_FILENO)) { + std::cout << "Unable to read email and password" << std::endl; + return 0; + } std::cout << "Email: "; std::getline(std::cin,email); pwd = getpass("Password: ");