Skip to contentSkip to conversation

put die() messages to stderr

PATCH In review Bert Wesarg 3 participants 4 messages Jun 15, 2016 – Aug 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 put die() messages to stderr

---
 tg.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tg.sh +1 -1
index 4dcc15e..21294f9 100644
@@ -13,7 +13,7 @@ info()
 
 die()
 {
-	info "fatal: $*"
+	info "fatal: $*" >&2
 	exit 1
 }
 
Signature · 1 line
tg: (f17218e..) bw/die-to-stderr (depends on: master)
#1 lore raw

also sprach Bert Wesarg <[email protected]> [2008.11.21.1105 +0100]:

tg.sh info() · line 16

Quoted 2 lines
tg.sh +1 -1
-	info "fatal: $*"
+	info "fatal: $*" >&2

Shouldn't info also output to stderr?

Signature · 7 lines
martin | http://madduck.net/ | http://two.sentenc.es/
 
"i have made good judgments in the past.
 i have made good judgments in the future."
                                                      - george w. bush
 
spamtraps: [email protected]
#2 lore raw
Quoted 5 lines · martin f krafft

also sprach Bert Wesarg <[email protected]> [2008.11.21.1105 +0100]:

tg.sh info() · line 16

Quoted 2 lines
tg.sh +1 -1
-	info "fatal: $*"
+	info "fatal: $*" >&2

Shouldn't info also output to stderr?

die is calling info. So this patch is enough.

You should just send this patch to the author. I think he'll apply it instantly. I've send a small patch to him yesterday as well.

Marc Weber

#3 lore raw

also sprach Marc Weber <[email protected]> [2008.11.21.1428 +0100]:

Quoted 3 lines
Quoted 1 line

Shouldn't info also output to stderr?

die is calling info. So this patch is enough.

Sure, I was just wondering whether info() shouldn't also print to stderr. Or only die(). I think info() prints status messages, which are not standard operation and thus don't go to stdout, but go to stderr. No?

Quoted 2 lines

You should just send this patch to the author. I think he'll apply it instantly. I've send a small patch to him yesterday as well.

Yes, but I applied that. :)

(I am Petr's apprentice, learning to help him a bit with TopGit).

Signature · 6 lines
martin | http://madduck.net/ | http://two.sentenc.es/
 
"wovon man nicht sprechen kann, darüber muß man schweigen."
                                                       -- wittgenstein
 
spamtraps: [email protected]