Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit f686290

Browse files
committed
chore: wrap debug output in dev mode check
Fix the `console.debug` statements to actually work, and only print them when Atom is in developer mode.
1 parent bb9bc27 commit f686290

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/server.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ export async function spawnServer(juliaExecutable: string): Promise<Server> {
4242
data.stderr += chunk.toString('utf8');
4343
},
4444
exit(exitCode) {
45-
// eslint-disable-next-line no-console
46-
console.debug(
47-
'[Linter-Julia] Server exited with code:', exitCode,
48-
'STDOUT:', data.stdout,
49-
'STDERR:', data.stderr,
50-
);
45+
if (atom.inDevMode()) {
46+
/* eslint-disable no-console */
47+
console.debug(`[Linter-Julia] Server exited with code: ${exitCode}`);
48+
console.debug(`STDOUT: ${data.stdout}`);
49+
console.debug(`STDERR: ${data.stderr}`);
50+
/* eslint-enable no-console */
51+
}
5152
},
5253
});
5354

0 commit comments

Comments
 (0)