Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions features/steps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ Feature: Make sure "Given", "When", "Then" steps work as expected
Then STDOUT should match /\d\.\d/
And STDERR should be empty

Scenario: Nested special variables
Given an empty directory
When I run `echo {INVOKE_WP_CLI_WITH_PHP_ARGS--dopen_basedir={RUN_DIR}} cli info`
Then STDOUT should match /^WP_CLI_PHP_ARGS=-dopen_basedir=.* ?wp cli info/
And STDERR should be empty

@require-mysql-or-mariadb
Scenario: SQL related variables
When I run `echo {MYSQL_BINARY}`
Expand Down
2 changes: 1 addition & 1 deletion src/Context/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ private function replace_invoke_wp_cli_with_php_args( $str ) {
}

$str = preg_replace_callback(
'/{INVOKE_WP_CLI_WITH_PHP_ARGS-([^}]*)}/',
'/{INVOKE_WP_CLI_WITH_PHP_ARGS-(.*)}/',
static function ( $matches ) use ( $phar_path, $shell_path ) {
return $phar_path ? "php {$matches[1]} {$phar_path}" : ( 'WP_CLI_PHP_ARGS=' . escapeshellarg( $matches[1] ) . ' ' . $shell_path );
},
Expand Down