Skip to content

Commit 7a0b1d7

Browse files
mjesuncpojer
authored andcommitted
Use stdout when requested to print the configuration (#6447)
1 parent 5a0e661 commit 7a0b1d7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- `[jest-runner]` Force parallel runs for watch mode, to avoid TTY freeze ([#6647](https://github.com/facebook/jest/pull/6647))
66
- `[jest-cli]` properly reprint resolver errors in watch mode ([#6407](https://github.com/facebook/jest/pull/6407))
7+
- `[jest-cli]` Write configuration to stdout when the option was explicitly passed to Jest ([#6447](https://github.com/facebook/jest/pull/6447))
78

89
## 23.3.0
910

packages/jest-cli/src/cli/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,13 @@ const printDebugInfoAndExitIfNeeded = (
205205
configs,
206206
outputStream,
207207
) => {
208-
if (argv.debug || argv.showConfig) {
208+
if (argv.debug) {
209209
logDebugMessages(globalConfig, configs, outputStream);
210+
return;
210211
}
212+
211213
if (argv.showConfig) {
214+
logDebugMessages(globalConfig, configs, process.stdout);
212215
exit(0);
213216
}
214217
};

0 commit comments

Comments
 (0)