1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

Fix to not output newline if redirecting to a file (#89)

This commit is contained in:
operator-name 2019-09-09 17:07:15 +01:00 committed by Kyle Spearrin
parent 6c1752d86f
commit 3915e43435

View File

@ -10,7 +10,7 @@ import { NodeUtils } from 'jslib/misc/nodeUtils';
export class CliUtils {
static writeLn(s: string, finalLine: boolean = false, error: boolean = false) {
const stream = error ? process.stderr : process.stdout;
if (finalLine && process.platform === 'win32') {
if (finalLine && (process.platform === 'win32' || !stream.isTTY)) {
stream.write(s);
} else {
stream.write(s + '\n');