summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2014-11-15 18:21:12 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2014-11-15 18:22:45 +0000
commit3f747fd7e5b6d982d0b8a46532149e20d600a6c7 (patch)
tree75f177e1c7756772331dacf8f73c8634443ad96d /dgit
parent346892585656da58a8d913cf9f808872a3096823 (diff)
Make fail() cope with multi-line messages
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit5
1 files changed, 4 insertions, 1 deletions
diff --git a/dgit b/dgit
index 5c8d24a..2056818 100755
--- a/dgit
+++ b/dgit
@@ -163,7 +163,10 @@ sub waitstatusmsg () {
sub printdebug { print DEBUG $debugprefix, @_ or die $!; }
sub fail {
- die $us.($we_are_responder ? " (build host)" : "").": @_\n";
+ my $s = "@_\n";
+ my $prefix = $us.($we_are_responder ? " (build host)" : "").": ";
+ $s =~ s/^/$prefix/gm;
+ die $s;
}
sub badcfg { print STDERR "$us: invalid configuration: @_\n"; exit 12; }