Skip to content

Commit e808654

Browse files
authored
ls: my_warn() omitted newline
* When providing multiple non-existent file arguments to ls, the warnings for each file were all printed on one line * Message strings passed to my_warn() don't include a newline terminator, so terminate the line within my_warn() * Bump version & remove unused Data::Dumper import
1 parent 88502db commit e808654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/ls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ BEGIN {
9797
}
9898
} # BEGIN
9999

100-
sub VERSION { '0.71' };
100+
sub VERSION { '0.72' };
101101

102-
use Data::Dumper;
103102
sub DirEntries {
104103
my( $class, $Options, $file ) = @_;
105104

@@ -406,6 +405,7 @@ sub my_warn {
406405
my( $class, $message, $prepend ) = @_;
407406
$prepend = 1 unless defined $prepend;
408407
$message = PROGRAM . ": " . $message if $prepend;
408+
$message .= "\n";
409409
print { $class->warn_fh } $message;
410410
}
411411

0 commit comments

Comments
 (0)