Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18103258
D19079.id45724.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
722 B
Referenced Files
None
Subscribers
None
D19079.id45724.diff
View Options
diff --git a/src/future/exec/CommandException.php b/src/future/exec/CommandException.php
--- a/src/future/exec/CommandException.php
+++ b/src/future/exec/CommandException.php
@@ -61,9 +61,11 @@
$len = strlen($string);
if ($len > $limit) {
$cut = $len - $limit;
- $suffix = pht('... (%s more byte(s)) ...', new PhutilNumber($cut));
- if ($cut > strlen($suffix)) {
- $string = substr($string, 0, $limit).$suffix;
+ $middle = pht('... (%s more byte(s)) ...', new PhutilNumber($cut));
+ if ($cut > strlen($middle)) {
+ $start = substr($string, 0, $limit * 2 / 3);
+ $end = substr($string, $len - $limit / 3);
+ $string = $start.$middle.$end;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 11, 3:21 AM (2 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8867169
Default Alt Text
D19079.id45724.diff (722 B)
Attached To
Mode
D19079: Cut the middle, not bottom, of a big traceback
Attached
Detach File
Event Timeline
Log In to Comment