Skip to content

Commit 1bdf764

Browse files
committed
chore: pipe output to stderr
1 parent 33183c5 commit 1bdf764

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.changeset/upset-shoes-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@repo/tools': patch
3+
---
4+
5+
chore: pipe output to stderr

packages/tools/src/cmd/shfmt.cmd.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ type Mode = 'write' | 'diff'
4040

4141
async function runShfmt(mode: Mode) {
4242
await Promise.all([
43-
$`rg --files-with-matches '^#!.*\\b(sh|bash|zsh|fish|dash|ksh|csh)\\b' -g '!*.*' .`.pipe(
44-
$`xargs shfmt --case-indent ${`--${mode}`}`
45-
),
43+
$`rg --files-with-matches '^#!.*\\b(sh|bash|zsh|fish|dash|ksh|csh)\\b' -g '!*.*' .`
44+
.pipe($`xargs shfmt --case-indent ${`--${mode}`}`)
45+
.pipe(process.stderr),
4646
$({
4747
nothrow: true, // may not be any .sh files
48-
})`rg --files-with-matches '^#!.*\\b(sh|bash|zsh|fish|dash|ksh|csh)\\b' -g '*.sh' .`.pipe(
49-
$`xargs shfmt --case-indent ${`--${mode}`}`
50-
),
48+
})`rg --files-with-matches '^#!.*\\b(sh|bash|zsh|fish|dash|ksh|csh)\\b' -g '*.sh' .`
49+
.pipe($`xargs shfmt --case-indent ${`--${mode}`}`)
50+
.pipe(process.stderr),
5151
])
5252
}
5353

0 commit comments

Comments
 (0)