[breaking] Fixed detection of double-install using `lib install` with...
[breaking] Fixed detection of double-install using `lib install` with `--git-url` or `--zip-path` (#1983) * Remove useless logging The errors are already reported upstream via returned `err` value * librariesmanager.InstallPrerequisiteCheck signature change It now accepts library name and version as single arguments since we are going to use this function also for libraries not present in the index. * Added integration test * Fixed `lib install --git-url` pre-install checks Now it performs all the needed checks to avoid multiple installations. * Added test for double install with -.zip-path flag * Fixed `lib install --zip-path` pre-install checks Now it performs all the needed checks to avoid multiple installations * Simplified loop in LibraryInstall function * Factored some of the checks in LibrariesManager.InstallPrerequisiteCheck They were duplicated and spread around all the library install functions. * Refactored LibrariesManager.getLibrariesDir function This helped to find out 2 places where the `installDir` was unnecessary. * Factored all duplicated code for importing a library from a directory * Updated docs * Fixed integration test The installation folder is now taken from the `name` field in `library.properties`. * Update docs/UPGRADING.md Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com> Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
Showing
This diff is collapsed.
Please register or sign in to comment