Skip to content

Commit 1ac3dac

Browse files
authored
Merge pull request #69 from wp-cli/replace-variables-in-created-files
Replace variables in generated file path and content
2 parents 8a004e9 + 2aadfb7 commit 1ac3dac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/steps/given.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ function ( $world ) {
4646
$steps->Given(
4747
'/^an? ([^\s]+) (file|cache file):$/',
4848
function ( $world, $path, $type, PyStringNode $content ) {
49-
$content = (string) $content . "\n";
49+
$path = $world->replace_variables( (string) $path );
50+
$content = $world->replace_variables( (string) $content ) . "\n";
5051
$full_path = 'cache file' === $type
5152
? $world->variables['SUITE_CACHE_DIR'] . "/$path"
5253
: $world->variables['RUN_DIR'] . "/$path";

0 commit comments

Comments
 (0)