From 5ea32ce2fcd527e9b6e6991c007d296afc5aa44d Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 29 Jun 2016 17:04:50 +0200 Subject: 38752: add comments to explain use of stdout instead of stderr for the which builtin --- Src/builtin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index c2fb81ed1..bfb9e6929 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3633,6 +3633,7 @@ bin_whence(char *nam, char **argv, Options ops, int func) } } if (!informed && (wd || v || csh)) { + /* this is information and not an error so, as in csh, use stdout */ zputs(*argv, stdout); puts(wd ? ": none" : " not found"); returnval = 1; @@ -3652,7 +3653,7 @@ bin_whence(char *nam, char **argv, Options ops, int func) } informed = 1; } else { - /* Not found at all. */ + /* Not found at all. That's not an error as such so this goes to stdout */ if (v || csh || wd) zputs(*argv, stdout), puts(wd ? ": none" : " not found"); returnval = 1; -- cgit 1.4.1