From a328802a5ae079e6f6c69df55fdcd77d4e11df6c Mon Sep 17 00:00:00 2001 From: Jameson Rollins Date: Sat, 25 Dec 2010 20:56:17 -0500 Subject: [PATCH] msva-query-agent only append newline to msg output if tty msva-query-agent will now only append a newline to the msva return message on stdout if there is a TTY. This allows calling processes that would like to capture the stdout to not have to deal with the newline, which is not actually a part of the original message anyway. --- msva-query-agent | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msva-query-agent b/msva-query-agent index e4e0a68..63f9e85 100755 --- a/msva-query-agent +++ b/msva-query-agent @@ -51,7 +51,8 @@ $client->log('info', "status: %s\n", $status); if (defined $ret) { $client->log('info', "valid: %s\n", $ret->{valid}); $client->log('info', "server: %s\n", $ret->{server}); - printf("%s\n", $ret->{message}); + printf("%s", $ret->{message}); + printf("\n") if (-t STDOUT); exit 0 if ($ret->{valid}); } -- 2.26.2