Skip to content

Commit 9154cba

Browse files
committed
fix Windows missing stty error
1 parent 2e0a82b commit 9154cba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Data/Dump/Tree.rakumod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ unless @.kb_colors.elems
249249
}
250250
@!kb_colors_cycle = |@.kb_colors xx * ;
251251

252-
my $width= %+((qx[stty size] || '0 80') ~~ /\d+ \s+ (\d+)/)[0] ;
252+
my $stty-size = '0 80';
253+
$stty-size = qx[stty size] unless $*DISTRO.name eq 'mswin32';
254+
my $width = %+(($stty-size) ~~ /\d+ \s+ (\d+)/)[0] ;
253255

254256
$.width //= $width ;
255257
$.width = $width if @.glyph_filters ; # $.width can be set to Inf, we can't pad that far.

0 commit comments

Comments
 (0)