Allow reading passwords from redirected input

This is beneficial for scripts that don't want to expose the password in the
command line arguments.
pull/62/head
Eroen 6 years ago
parent ffcde1b04e
commit ee53edc935

@ -159,7 +159,15 @@ namespace DepotDownloader
do
{
Console.Write( "Enter account password for \"{0}\": ", username );
if ( Console.IsInputRedirected )
{
password = Console.ReadLine();
}
else
{
// Avoid console echoing of password
password = Util.ReadPassword();
}
Console.WriteLine();
} while ( String.Empty == password );
}

Loading…
Cancel
Save