diff --git a/e2e/nx-misc/src/extras.test.ts b/e2e/nx-misc/src/extras.test.ts index 92810f53a785a..654e93d6cb5a0 100644 --- a/e2e/nx-misc/src/extras.test.ts +++ b/e2e/nx-misc/src/extras.test.ts @@ -200,8 +200,8 @@ describe('Extra Nx Misc Tests', () => { runCLI(`run ${mylib}:error`); fail('Should error if process errors'); } catch (e) { - expect(e.stdout.toString()).toContain( - 'Something went wrong in run-commands - Command failed: exit 1' + expect(e.stderr.toString()).toContain( + 'command "exit 1" exited with non-zero status code' ); } }); diff --git a/packages/nx/src/executors/run-commands/run-commands.impl.ts b/packages/nx/src/executors/run-commands/run-commands.impl.ts index 6bab85751d3a5..d0bfdcfdbf2d2 100644 --- a/packages/nx/src/executors/run-commands/run-commands.impl.ts +++ b/packages/nx/src/executors/run-commands/run-commands.impl.ts @@ -184,7 +184,7 @@ async function runSerially( ); if (!success) { process.stderr.write( - `Warning: run-commands command "${c}" exited with non-zero status code` + `Warning: run-commands command "${c.command}" exited with non-zero status code` ); return false; }