From 0b37cc5e37bbe0898505edfd4faea9981888bd07 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 20 Aug 2014 13:31:20 -0400 Subject: more ponies behind fewer pipes. --- ponymix.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ponymix.cc b/ponymix.cc index 48a751e..37dec3f 100644 --- a/ponymix.cc +++ b/ponymix.cc @@ -472,7 +472,8 @@ static const std::pair& string_to_command( } static void version() { - execlp("ponysay", "ponysay", "-b", "", "ponymix " PONYMIX_VERSION, NULL); + if (isatty(fileno(stdout))) + execlp("ponysay", "ponysay", "-b", "", "ponymix " PONYMIX_VERSION, NULL); // Some people are pony haters. fputs("ponymix v" PONYMIX_VERSION "\n", stdout); -- cgit v1.2.3