We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41b2c23 commit a71ea61Copy full SHA for a71ea61
tools/src/main/python/opengrok_tools/utils/command.py
@@ -25,6 +25,7 @@
25
import os
26
import signal
27
import subprocess
28
+import textwrap
29
import threading
30
import time
31
@@ -211,7 +212,7 @@ def run(self):
211
212
213
# Assuming that self.max_line_length is bigger than 3.
214
if self.max_line_length > 0 and len(line) > self.max_line_length:
- line = line[:self.max_line_length] + "..."
215
+ line = textwrap.shorten(line, width=self.max_line_length, placeholder="...")
216
217
# Shorten the list to be one less than the maximum because a line is going to be added.
218
if self.max_lines > 0 and len(self.out) >= self.max_lines:
0 commit comments