Skip to content

Commit 314caec

Browse files
committed
Dot in ".exe" preg should be escaped.
1 parent 3361cc1 commit 314caec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cli/Shell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static public function columns() {
3434
if ( function_exists( 'exec' ) ) {
3535
if ( self::is_windows() ) {
3636
// Cater for shells such as Cygwin and Git bash where `mode CON` returns an incorrect value for columns.
37-
if ( ( $shell = getenv( 'SHELL' ) ) && preg_match( '/(?:bash|zsh)(?:.exe)?$/', $shell ) && getenv( 'TERM' ) ) {
37+
if ( ( $shell = getenv( 'SHELL' ) ) && preg_match( '/(?:bash|zsh)(?:\.exe)?$/', $shell ) && getenv( 'TERM' ) ) {
3838
$columns = (int) exec( 'tput cols' );
3939
}
4040
if ( ! $columns ) {

0 commit comments

Comments
 (0)