Skip to content

Commit 02588c9

Browse files
committed
fix(c): wrong exit code with -q option 🐞
1 parent 1e5c5c4 commit 02588c9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ copy() {
141141
catThenCopy() {
142142
local content
143143
content="$(cat)"
144-
{
144+
if $keep_eol; then
145+
printf '%s\n' "$content"
146+
else
145147
printf %s "$content"
146-
$keep_eol && echo
147-
} | copy
148+
fi | copy
148149
}
149150

150151
teeAndCopy() {

0 commit comments

Comments
 (0)