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.
2 parents bbfdf33 + 1d81e25 commit c3bb746Copy full SHA for c3bb746
lib/thor/shell/basic.rb
@@ -1,6 +1,8 @@
1
class Thor
2
module Shell
3
class Basic
4
+ DEFAULT_TERMINAL_WIDTH = 80
5
+
6
attr_accessor :base
7
attr_reader :padding
8
@@ -279,11 +281,11 @@ def terminal_width
279
281
result = if ENV["THOR_COLUMNS"]
280
282
ENV["THOR_COLUMNS"].to_i
283
else
- unix? ? dynamic_width : 80
284
+ unix? ? dynamic_width : DEFAULT_TERMINAL_WIDTH
285
end
- result < 10 ? 80 : result
286
+ result < 10 ? DEFAULT_TERMINAL_WIDTH : result
287
rescue
- 80
288
+ DEFAULT_TERMINAL_WIDTH
289
290
291
# Called if something goes wrong during the execution. This is used by Thor
0 commit comments