diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 994817727..811a6832e 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -429,10 +429,7 @@ EOT return false; } - $pattern = sprintf( - '~^/?%s(/|/\*)?$~', - preg_quote($vendor, '~') - ); + $pattern = sprintf('{^/?%s(/\*?)?$}', preg_quote($vendor)); $lines = file($ignoreFile, FILE_IGNORE_NEW_LINES); foreach ($lines as $line) {