Skip to content

Build your personal knowledge base with Trilium Notes

feat(core): use real console width in console banner

Elian Doranf04f295b219a
diff --git a/packages/trilium-core/src/services/log.ts b/packages/trilium-core/src/services/log.ts
index e3cc68af2e..2447811c9b 100644
--- a/packages/trilium-core/src/services/log.ts
+++ b/packages/trilium-core/src/services/log.ts
@@ -14,7 +14,8 @@ export default class LogService {
banner(message: string | undefined) {
if (!message) return;
- const maxContent = 76; // 80 - 4 (border + padding)
+ const termWidth = (typeof process !== "undefined" && process.stdout?.columns) || 80;
+ const maxContent = termWidth - 4; // border + padding
const words = message.split(" ");
const lines: string[] = [];
let current = "";