Skip to content

Commit

Permalink
Merge pull request #290 from mknos/tee-open
Browse files Browse the repository at this point in the history
tee: null mode param passed to open()
  • Loading branch information
briandfoy authored Oct 16, 2023
2 parents a16ab0a + 8a41174 commit df7e53b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/tee
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if ($nostdout) {
$| = 1 if $unbuffer;

for (@ARGV) {
if (!open($fh, (/^[^>|]/ && $mode), $_)) {
if (!open($fh, $mode, $_)) {
warn "$0: cannot open $_: $!\n"; # like sun's; i prefer die
$status++;
next;
Expand Down

0 comments on commit df7e53b

Please sign in to comment.