diff options
Diffstat (limited to 'make/console.pm')
-rw-r--r-- | make/console.pm | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/make/console.pm b/make/console.pm index 621de0274..84fbaae4a 100644 --- a/make/console.pm +++ b/make/console.pm @@ -57,22 +57,26 @@ sub __console_format($$) { sub print_format($;$) { my $message = shift; my $stream = shift // *STDOUT; - while ($message =~ /(<\|(\S+)\s(.+?)\|>)/) { + while ($message =~ /(<\|(\S+)\s(.*?)\|>)/) { my $formatted = __console_format $2, $3; $message =~ s/\Q$1\E/$formatted/; } print { $stream } $message; } -sub print_error($) { - my $message = shift; - print_format "<|RED Error:|> $message\n", *STDERR; +sub print_error { + print_format "<|RED Error:|> ", *STDERR; + for my $line (@_) { + print_format "$line\n", *STDERR; + } exit 1; } -sub print_warning($) { - my $message = shift; - print_format "<|YELLOW Warning:|> $message\n", *STDERR; +sub print_warning { + print_format "<|YELLOW Warning:|> ", *STDERR; + for my $line (@_) { + print_format "$line\n", *STDERR; + } } sub prompt_bool($$$) { |