Enhance lib install from git url and zip file #1145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
before creating one)
UPGRADING.md
has been updated with a migration guide (for breaking changes)Enhances the behaviour of
lib install
when using the--git-url
or--zip-file
flags.Previously installing from a zip file would extract the content directly into the user library folder, this could have caused problem if the zip file wasn't structured correctly.
Installing from a git repository would clone the repo directly to the user library folder and leave it as it is. Also it would fail if the library is already installed and would not reinstall it.
When using the
--zip-file
flag we now extract to a temp directory to verify that the zip is structured correctly and to infer the name of the library being installed. If everything is fine we then copy it over to the user library folder to finalize the installation.When using the
--git-url
flag after cloning the repository to the user library folder we delete the.git
folder to make it a plain folder. Cloning should be faster too since we now clone using depth of one commit to avoid downloading useless files.Both when installing from a zip file or from a git repository we delete the installed library folder if one with the same name is already installed. This fixes failures when trying to install with
--git-url
an already installed library.Nope.
None.
See how to contribute