Skip to content

Commit 3ba6a45

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

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: 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

Diff for: exe/arduino_ci.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
require 'pathname'
55
require 'optparse'
66

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

0 commit comments

Comments
 (0)