Skip to content

Commit

Permalink
do not print output as stdio is inherited
Browse files Browse the repository at this point in the history
  • Loading branch information
amorscher committed Nov 24, 2023
1 parent c8a49c7 commit 40ddb8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion libs/commands/run/src/index.ts
Expand Up @@ -250,7 +250,6 @@ export class RunCommand extends Command<RunCommandConfigOptions> {
pkg.name,
(getElapsed() / 1000).toFixed(1)
);
output(result.stdout);

return result;
});
Expand Down
8 changes: 5 additions & 3 deletions libs/commands/run/src/lib/run-command.spec.ts
Expand Up @@ -45,9 +45,10 @@ const ranInPackagesStreaming = (testDir: string) =>
);

describe("RunCommand", () => {
npmRunScript.mockImplementation((script: string, { pkg }: { pkg: Package }) =>
Promise.resolve({ exitCode: 0, stdout: pkg.name })
);
npmRunScript.mockImplementation((script: string, { pkg }: { pkg: Package }) => {
output(pkg.name);
return Promise.resolve({ exitCode: 0, stdout: pkg.name });
});
npmRunScriptStreaming.mockImplementation(() => Promise.resolve({ exitCode: 0 }));

afterEach(() => {
Expand Down Expand Up @@ -166,6 +167,7 @@ describe("RunCommand", () => {
err.exitCode = 456;
err.stdout = pkg.name;

output(pkg.name);
return Promise.resolve(err);
});

Expand Down

0 comments on commit 40ddb8f

Please sign in to comment.