Skip to content

Commit e5a9bd1

Browse files
fix(scripts): populate failing NPM publish command
1 parent 4c8c84d commit e5a9bd1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/release-tasks.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Listr, { ListrTask } from 'listr';
44
import { buildAll } from './build';
55
import { BuildOptions } from './utils/options';
66
import { isPrereleaseVersion, isValidVersionInput, SEMVER_INCREMENTS, updateChangeLog } from './utils/release-utils';
7+
import { stderr } from 'node:process';
78

89
/**
910
* We have to wrap `execa` in a promise to ensure it works with `Listr`. `Listr` uses rxjs under the hood which
@@ -165,7 +166,12 @@ export async function runReleaseTasks(opts: BuildOptions, args: ReadonlyArray<st
165166
if (isDryRun) {
166167
return console.log(`[dry-run] ${cmd} ${cmdArgs.join(' ')}`);
167168
}
168-
return execa(cmd, cmdArgs, { cwd: rootDir });
169+
return execa(cmd, cmdArgs, { cwd: rootDir }).then(({ stdout, stderr }) => {
170+
if (stderr) {
171+
throw new Error(stderr);
172+
}
173+
console.log(stdout);
174+
});
169175
},
170176
},
171177
{

0 commit comments

Comments
 (0)