summaryrefslogtreecommitdiff
path: root/make/console.pm
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-01-27 16:47:08 +0000
committerSadie Powell <sadie@witchery.services>2021-01-27 16:47:08 +0000
commit859a79923a1e9df7195e1320d66b61ee162f52cc (patch)
tree691a9d5cb9aea1e587c130888b389398843b7b45 /make/console.pm
parentf6b861f12d070ba931d829505bfd3229653f5df2 (diff)
Migrate some stuff away from print_format.
Diffstat (limited to 'make/console.pm')
-rw-r--r--make/console.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/make/console.pm b/make/console.pm
index 278c97d0f..50df77ea5 100644
--- a/make/console.pm
+++ b/make/console.pm
@@ -76,17 +76,17 @@ sub print_format($;$) {
}
sub print_error {
- print_format "<|RED Error:|> ", *STDERR;
+ print STDERR console_format "<|RED Error:|> ";
for my $line (@_) {
- print_format "$line\n", *STDERR;
+ say STDERR console_format $line;
}
exit 1;
}
sub print_warning {
- print_format "<|YELLOW Warning:|> ", *STDERR;
+ print STDERR console_format "<|YELLOW Warning:|> ";
for my $line (@_) {
- print_format "$line\n", *STDERR;
+ print STDERR console_format $line;
}
}
@@ -119,8 +119,8 @@ sub prompt_dir($$$;$) {
sub prompt_string($$$) {
my ($interactive, $question, $default) = @_;
return $default unless $interactive;
- print_format "$question\n";
- print_format "[<|GREEN $default|>] => ";
+ say console_format $question;
+ say console_format "[<|GREEN $default|>] => ";
chomp(my $answer = <STDIN>);
say '';
return $answer ? $answer : $default;