1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 10:38:49 +01:00

Only create vendor dir in config if it exists

This commit is contained in:
Matt Brown 2020-11-18 00:06:58 -05:00
parent 6e39c24a17
commit f3cde30b77

View File

@ -60,11 +60,19 @@ class Creator
self::TEMPLATE
);
$template = str_replace(
'<directory name="vendor" />',
'<directory name="' . $vendor_dir . '" />',
$template
);
if (is_dir($current_dir . DIRECTORY_SEPARATOR . $vendor_dir)) {
$template = str_replace(
'<directory name="vendor" />',
'<directory name="' . $vendor_dir . '" />',
$template
);
} else {
$template = str_replace(
'<directory name="vendor" />',
'',
$template
);
}
$template = str_replace(
'errorLevel="1"',