Fix update indexes running when not necessary #1063
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)
our contributing guidelines
An overall enhancement of the CLI behaviour.
If a local index file is missing the CLI tries to download it from the related additional URL whenever it tries to create a new internal instance, if that URL is unreachable for any reason the subsequent command always fails.
This would happen when executing any command.
Indexes update is now only executed for certain specific commands like
update
,core update-index
,lib update-index
andcore search
, or whenever thelibrary_index.json
orpackage_index.json
files are missing.The initialization of an internal CLI instance still makes the whole command fail if a local index file is missing but the message is clearer now.
Updating indexes now shows a clear error if an URL is unreachable for any reason, we check for
4xx
or5xx
HTTP status codes so in those cases it fails.No.
None.
This should also fix #1050.
See how to contribute