Skip to content

Commit

Permalink
fix(run): display pkg name only when not streaming, fixes #149
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed May 10, 2022
1 parent 96a5b92 commit bf60bf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vscode/launch.json
Expand Up @@ -107,7 +107,8 @@
"packages/cli/src/cli.ts",
"run",
"pack-tarball",
"--stream"
"--stream",
"--no-bail"
],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
Expand Down
8 changes: 4 additions & 4 deletions packages/run/src/run-command.ts
Expand Up @@ -124,7 +124,7 @@ export class RunCommand extends Command {
results
.filter((result) => result?.failed)
.forEach((result) => {
this.logger.error('', result.pkg.name, result.stderr);
this.logger.error('', result.pkg?.name ?? '', result.stderr);
});
}
process.exitCode = exitCode;
Expand All @@ -146,12 +146,12 @@ export class RunCommand extends Command {
(getElapsed() / 1000).toFixed(1)
);

if (!this.bail) {
if (!this.bail && !this.options.stream) {
results.forEach((result) => {
if (result?.failed) {
this.logger.error('', `- ${result.pkg.name}`);
this.logger.error('', `- ${result.pkg?.name ?? ''}`);
} else {
this.logger.success('', ` - ${result.pkg.name}`);
this.logger.success('', ` - ${result.pkg?.name ?? ''}`);
}
});
} else {
Expand Down

0 comments on commit bf60bf0

Please sign in to comment.