From e2adbd8e503c8d9338062beccdd1eba8594efb3d Mon Sep 17 00:00:00 2001 From: Al Danial Date: Fri, 17 Jun 2016 18:09:46 -0700 Subject: [PATCH] more portable test for presence of c_count on Unix-like systems, issue #105 --- cloc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloc b/cloc index e3feebb3..8c72383b 100755 --- a/cloc +++ b/cloc @@ -130,7 +130,10 @@ if ($ON_WINDOWS and $ENV{'SHELL'}) { } my $HAVE_SLOCCOUNT_c_count = 0; if (!$ON_WINDOWS) { - $HAVE_SLOCCOUNT_c_count = external_utility_exists("echo 'abc' | c_count"); + # Debian based systems will hang if just doing + # external_utility_exists("c_count") + # if c_count is in $PATH; c_count expects to have input. + $HAVE_SLOCCOUNT_c_count = external_utility_exists("c_count /bin/sh"); } my $NN = chr(27) . "[0m"; # normal