1
0
Fork 0

password fix for Windows

This commit is contained in:
Jan Steemann 2016-07-07 14:58:32 +02:00
parent 5f2dc7065f
commit 5289d90ff3
1 changed files with 3 additions and 6 deletions

View File

@ -335,15 +335,12 @@ std::string ConsoleFeature::readPassword(std::string const& message) {
}
std::string ConsoleFeature::readPassword() {
std::string password;
#ifdef TRI_HAVE_TERMIOS_H
TRI_SetStdinVisibility(false);
std::getline(std::cin, password);
TRI_SetStdinVisibility(true);
#else
TRI_DEFER(TRI_SetStdinVisibility(true));
std::string password;
std::getline(std::cin, password);
#endif
return password;
}