Skip to content
Snippets Groups Projects
Commit a52113e5 authored by Alex Pott's avatar Alex Pott Committed by Conrad Lara
Browse files

Applied suggestion to use file_exists()

parent 0f6883ea
No related branches found
No related tags found
1 merge request!6097Issue #3112393: Allow vendor hardening to remove individual files
......@@ -347,7 +347,7 @@ protected function cleanPathsForPackage(PackageInterface $package, $paths_for_pa
$fs = new Filesystem();
foreach ($paths_for_package as $cleanup_item) {
$cleanup_path = $package_dir . '/' . $cleanup_item;
if (!is_dir($cleanup_path) && !is_file($cleanup_path)) {
if (!file_exists($cleanup_path)) {
// If the package has changed or the --prefer-dist version does not
// include the directory. This is not an error.
$this->io->writeError(sprintf("%s<comment>Path '%s' does not exist.</comment>", str_repeat(' ', 6), $cleanup_path), TRUE, IOInterface::VERY_VERBOSE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment