From 7a829ede1107374ca18355c088f2426aae9c9f7f Mon Sep 17 00:00:00 2001 From: James Yonan Date: Fri, 29 Oct 2021 00:37:46 -0500 Subject: [PATCH] cli: fixed expected behavior of --write-url, -Z cli -Z is used by automated test scripts to write the SSO URL to a file rather than launch a browser with the URL. Recently this behavior changed on Linux where -Z now both writes the URL to a file and also launches a browser with the URL. This patch reverts behavior back to only writing the file. Signed-off-by: James Yonan --- test/ovpncli/cli.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/ovpncli/cli.cpp b/test/ovpncli/cli.cpp index 892d6f30..4f9dff7d 100644 --- a/test/ovpncli/cli.cpp +++ b/test/ovpncli/cli.cpp @@ -330,8 +330,10 @@ private: || string::starts_with(url_str, "https://")) { if (!write_url_fn.empty()) - write_string(write_url_fn, url_str + '\n'); - + { + write_string(write_url_fn, url_str + '\n'); + return; + } #ifdef OPENVPN_PLATFORM_MAC std::thread thr([url_str]() {