mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-30 13:03:53 +01:00
Fix to not output newline if redirecting to a file (#89)
This commit is contained in:
parent
6c1752d86f
commit
3915e43435
@ -10,7 +10,7 @@ import { NodeUtils } from 'jslib/misc/nodeUtils';
|
|||||||
export class CliUtils {
|
export class CliUtils {
|
||||||
static writeLn(s: string, finalLine: boolean = false, error: boolean = false) {
|
static writeLn(s: string, finalLine: boolean = false, error: boolean = false) {
|
||||||
const stream = error ? process.stderr : process.stdout;
|
const stream = error ? process.stderr : process.stdout;
|
||||||
if (finalLine && process.platform === 'win32') {
|
if (finalLine && (process.platform === 'win32' || !stream.isTTY)) {
|
||||||
stream.write(s);
|
stream.write(s);
|
||||||
} else {
|
} else {
|
||||||
stream.write(s + '\n');
|
stream.write(s + '\n');
|
||||||
|
Loading…
Reference in New Issue
Block a user