From 5289d90ff3a7ed8a9b8cfee98729632b8a63a305 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 7 Jul 2016 14:58:32 +0200 Subject: [PATCH] password fix for Windows --- arangosh/Shell/ConsoleFeature.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arangosh/Shell/ConsoleFeature.cpp b/arangosh/Shell/ConsoleFeature.cpp index 0e1c95c48b..2c54f8ceba 100644 --- a/arangosh/Shell/ConsoleFeature.cpp +++ b/arangosh/Shell/ConsoleFeature.cpp @@ -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; }