Skip to content

Commit

Permalink
more portable test for presence of c_count on Unix-like systems,
Browse files Browse the repository at this point in the history
issue #105
  • Loading branch information
AlDanial committed Jun 18, 2016
1 parent 9bb070a commit e2adbd8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cloc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2adbd8

Please sign in to comment.