Skip to content

Commit 15ef5ab

Browse files
authored
fix(scripts): allow stderr to pass through (#282)
1 parent 3e7682f commit 15ef5ab

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ target
1717
**/.DS_Store
1818
.gradle
1919
build
20+
pom.xml
2021

2122
dist
2223

scripts/common.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,22 @@ export async function run(
117117
try {
118118
if (verbose) {
119119
return (
120-
await execa.command(command, {
121-
stdout: 'inherit',
122-
shell: 'bash',
123-
cwd,
124-
})
125-
).stdout;
120+
(
121+
await execa.command(command, {
122+
stdout: 'inherit',
123+
stderr: 'inherit',
124+
stdin: 'inherit',
125+
all: true,
126+
shell: 'bash',
127+
cwd,
128+
})
129+
).all ?? ''
130+
);
126131
}
127-
return (await execa.command(command, { shell: 'bash', cwd })).stdout;
132+
return (
133+
(await execa.command(command, { shell: 'bash', all: true, cwd })).all ??
134+
''
135+
);
128136
} catch (err) {
129137
if (errorMessage) {
130138
throw new Error(`[ERROR] ${errorMessage}`);

0 commit comments

Comments
 (0)