Added check in \ncc\Managers > PackageManager > uninstallPackageVersion()
This commit is contained in:
parent
856db39f9a
commit
50042a244d
1 changed files with 13 additions and 6 deletions
|
@ -732,6 +732,8 @@
|
||||||
$scanner = new DirectoryScanner();
|
$scanner = new DirectoryScanner();
|
||||||
$filesystem = new Filesystem();
|
$filesystem = new Filesystem();
|
||||||
|
|
||||||
|
if($filesystem->exists($version_entry->Location))
|
||||||
|
{
|
||||||
/** @var SplFileInfo $item */
|
/** @var SplFileInfo $item */
|
||||||
/** @noinspection PhpRedundantOptionalArgumentInspection */
|
/** @noinspection PhpRedundantOptionalArgumentInspection */
|
||||||
foreach($scanner($version_entry->Location, true) as $item)
|
foreach($scanner($version_entry->Location, true) as $item)
|
||||||
|
@ -742,6 +744,11 @@
|
||||||
$filesystem->remove($item->getPath());
|
$filesystem->remove($item->getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console::outWarning(sprintf('warning: package location %s does not exist', $version_entry->Location));
|
||||||
|
}
|
||||||
|
|
||||||
$filesystem->remove($version_entry->Location);
|
$filesystem->remove($version_entry->Location);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue