mirror of
https://github.com/composer/composer
synced 2025-05-09 16:42:57 +00:00
Do not use detected width for output formatting if it is not available
This commit is contained in:
parent
a2ffda4f13
commit
a965642769
1 changed files with 5 additions and 0 deletions
|
@ -185,6 +185,11 @@ EOT
|
|||
}
|
||||
}
|
||||
list($width) = $this->getApplication()->getTerminalDimensions();
|
||||
if (null === $width) {
|
||||
// In case the width is not detected, we're probably running the command
|
||||
// outside of a real terminal, use space without a limit
|
||||
$width = INF;
|
||||
}
|
||||
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
|
||||
$width--;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue