Skip to content

Commit ecdf5cd

Browse files
committed
allow flexibility in console width
1 parent 71c89c3 commit ecdf5cd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1212

1313
### Changed
1414
- Update .gitattributes so we have consistent line endings
15+
- Test runner detects console width if possible, allowing variable width from 80-132 chars
1516

1617
### Deprecated
1718

exe/arduino_ci.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
require 'set'
44
require 'pathname'
55
require 'optparse'
6+
require 'io/console'
67

7-
WIDTH = 80
8+
# be flexible between 80 and 132 cols of output
9+
WIDTH = begin
10+
[132, [80, IO::console.winsize[1] - 2].max].min
11+
rescue NoMethodError
12+
80
13+
end
814
VAR_CUSTOM_INIT_SCRIPT = "CUSTOM_INIT_SCRIPT".freeze
915
VAR_USE_SUBDIR = "USE_SUBDIR".freeze
1016
VAR_EXPECT_EXAMPLES = "EXPECT_EXAMPLES".freeze

0 commit comments

Comments
 (0)