[Sheepdog] [PATCH 1/2] collie: turn off highlight option when stdout is not terminal
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Thu May 20 10:06:03 CEST 2010
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
collie/collie.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/collie/collie.c b/collie/collie.c
index 38eb071..9efb532 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -1077,6 +1077,9 @@ int main(int argc, char **argv)
}
}
+ if (!isatty(STDOUT_FILENO))
+ highlight = 0;
+
if (flags & SUBCMD_FLAG_NEED_NOEDLIST) {
ret = update_node_list(SD_MAX_NODES, 0);
if (ret < 0) {
--
1.5.6.5
More information about the sheepdog
mailing list