In Duplicati v126.96.36.199, the commandline utilities no longer return any output. I guess “Removed all calls to Console.WriteLine as it could lock up the console on Windows” from the release notes is responsible for this behaviour.
Is this a temporary fix to prevent lockups, a permanent change of just a bug?
I hope the commandline tools will report back results in one of the next versions, because even Duplicati.CommandLine.exe help advanced doesn’t show any information.
As a workaround, I use the help command from the CommandLine item in the Web UI.
For both 188.8.131.52 and 184.108.40.206, I downloaded the Zip version, extracted the zip and executed Duplicati.CommandLine.exe help advanced from the extracted folder.
For the 220.127.116.11 version, I started the server with Duplicati.Server.exe --webservice-port=8500 --portable-mode, created a test job in the Web UI and launched the help command using the Commandline menu of the test job.
In that case, it seems likely it’s from my commit. Can you try to re add the stdout/stderr stream redirects, but not stdin, and see what happens on Windows? Redirecting stdin breaks it on Linux as we saw. Hopefully not redirecting stdin also works on Windows.
That sounds reasonable, although it would be nice to have something uniform. I don’t have time to look into it right now, though my fingers are itching From the C# Today link you’d say it should’ve worked on windows, the screenshots on that page are from Windows and display the desired behavior.
I read the change. So on Windows in ReadPassphraseFromConsole throws an InvalidOperation exception, by
probably Console.ReadKey? Though Console.Readline works fine in the ReadPassphraseFromStdin? Strange.
Yes, the Console.ReadKey() reads from the keyboard, not stdin. If the console is redirected, the method throws InvalidOperationException. We can read from Console.ReadLine(), as that just returns a line from stdin. Downside is that we cannot mask the input, but for now, I think this is a better solution than having a broken password input.