Skip to content

Commit b55eff4

Browse files
committed
Shells should send console.warn and error to stderr
Right now they go to stdout, which makes running with json-dumping less effective since we `warn` the subset of tests being run.
1 parent 24b1911 commit b55eff4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ if (typeof console == "undefined")
2929

3030
console.debug ??= (...args) => console.log("Debug:", ...args);
3131
console.log ??= (...args) => print(args.join(" "));
32-
console.warn ??= (...args) => console.log("Warn:", ...args);
33-
console.error ??= (...args) => console.log("Error:", ...args);
32+
console.warn ??= (...args) => printErr("Warn: " + args.join(" "));
33+
console.error ??= (...args) => printErr("Error: " + args.join(" "));
3434
console.assert ??= (condition, message) => {
3535
if (!condition)
3636
throw new Error(`Assertion failed: ${message}`);

0 commit comments

Comments
 (0)