Skip to content

Commit be8274d

Browse files
committed
fix(console): disable long line splitting
1 parent f737579 commit be8274d

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

lib/common/mobile/device-log-provider.ts

+19-12
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,26 @@ export class DeviceLogProvider extends DeviceLogProviderBase {
150150
}
151151

152152
private printLine(prefix: string, ...parts: string[]) {
153-
const maxWidth = process.stdout.columns - 2;
154153
const fullLine = parts.join(" ");
155-
156-
// console.log(prefix, fullLine);
157-
// return;
158-
if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
159-
console.log(prefix, fullLine);
160-
} else {
161-
for (let i = 0; i < fullLine.length; i += maxWidth) {
162-
const part = fullLine.substring(i, i + maxWidth);
163-
console.log(prefix, part);
164-
}
165-
}
154+
console.log(prefix, fullLine);
155+
156+
/**
157+
* Note: Disabled
158+
*
159+
* This splits the output into lines that fit within the current
160+
* terminal width, however this makes copying json objects that
161+
* span across multiple lines difficult, as it introduces
162+
* whitespace & line breaks
163+
*/
164+
// const maxWidth = process.stdout.columns - 2;
165+
// if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
166+
// console.log(prefix, fullLine);
167+
// } else {
168+
// for (let i = 0; i < fullLine.length; i += maxWidth) {
169+
// const part = fullLine.substring(i, i + maxWidth);
170+
// console.log(prefix, part);
171+
// }
172+
// }
166173
}
167174
}
168175
injector.register("deviceLogProvider", DeviceLogProvider);

0 commit comments

Comments
 (0)